当前位置: 首页>>代码示例>>PHP>>正文


PHP ACL::hasPermission方法代码示例

本文整理汇总了PHP中ACL::hasPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP ACL::hasPermission方法的具体用法?PHP ACL::hasPermission怎么用?PHP ACL::hasPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ACL的用法示例。


在下文中一共展示了ACL::hasPermission方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: redirectfromlogin

function redirectfromlogin()
{
    $userACL = new ACL($_SESSION['userID']);
    if ($userACL->hasPermission('access_admin') === true) {
        echo "user has admin access";
        header("Location: ../admin/index.php");
    } else {
        if ($userACL->hasPermission('login_staff') === true) {
            echo "must be staff so send to staff webpage";
            header("Location: http://www.10dd.co/admin/_staff.php");
        } else {
            if ($userACL->hasPermission('login_client') === true) {
                echo "must be client so send to client webpage";
                header("Location: http://www.10dd.co/admin/_client.php");
            } else {
                if ($userACL->hasPermission('login_vendor') === true) {
                    echo "must be vendor so send to vendor webpage";
                    header("Location: http://www.10dd.co/admin/_vendor.php");
                } else {
                    if ($userACL->hasPermission('basic_user') === true) {
                        echo "must be vendor so send to vendor webpage";
                        header("Location: http://www.10dd.co/admin/_vendor.php");
                    } else {
                        echo "must not have access";
                        header("Location: http://www.10dd.co/admin/insufficientrights.php");
                    }
                }
            }
        }
    }
}
开发者ID:juslee,项目名称:e27,代码行数:31,代码来源:functions.php

示例2: signEncounter

 /**
  * @param stdClass $params
  * @return array
  */
 public function signEncounter(stdClass $params)
 {
     $this->setEid($params->eid);
     /** verify permissions (sign encounter and supervisor) */
     if (!ACL::hasPermission('sign_enc') || $params->isSupervisor && !ACL::hasPermission('sign_enc_supervisor')) {
         return ['success' => false, 'error' => 'access_denied'];
     }
     $user = new User();
     if ($params->isSupervisor) {
         if ($params->supervisor_uid != $_SESSION['user']['id']) {
             unset($user);
             return ['success' => false, 'error' => 'supervisor_does_not_match_user'];
         }
         if (!$user->verifyUserPass($params->signature, $params->supervisor_uid)) {
             unset($user);
             return ['success' => false, 'error' => 'incorrect_password'];
         }
     } else {
         if (!$user->verifyUserPass($params->signature)) {
             unset($user);
             return ['success' => false, 'error' => 'incorrect_password'];
         }
     }
     unset($user);
     if ($params->isSupervisor) {
         $params->close_date = date('Y-m-d H:i:s');
     } else {
         $params->provider_uid = $_SESSION['user']['id'];
         if (!ACL::hasPermission('require_enc_supervisor')) {
             $params->close_date = date('Y-m-d H:i:s');
         }
     }
     $data = $this->updateEncounter($params);
     return ['success' => true, 'data' => $data];
 }
开发者ID:igez,项目名称:gaiaehr,代码行数:39,代码来源:Encounter.php

示例3: getNavigation

 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = array(array('text' => $this->t['dashboard'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_dashboard') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'panelDashboard'), array('text' => $this->t['calendar'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_calendar') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoCalendar', 'id' => 'panelCalendar'), array('text' => $this->t['messages'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_messages') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'mail', 'id' => 'panelMessages'), array('text' => $this->t['patient_Search'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_search') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'searchUsers', 'id' => 'panelPatientSearch'));
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Patient', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => $this->t['new_patient'][$this->lang], 'disabled' => $this->ACL->hasPermission('add_patient') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelNewPatient'), array('text' => $this->t['patient_summary'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_summary') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelSummary'), array('text' => $this->t['visist_history'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_patient_visits') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisits'), array('text' => $this->t['encounter'][$this->lang], 'disabled' => $this->ACL->hasPermission('access_encounters') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelEncounter'))));
     // *************************************************************************************
     // Fees Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Fees', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => $this->t['billing'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelBilling'), array('text' => $this->t['checkout'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelCheckout'), array('text' => $this->t['fees_sheet'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFeesSheet'), array('text' => $this->t['payment'][$this->lang], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPayments'))));
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     if ($this->ACL->hasPermission('access_gloabal_settings') || $this->ACL->hasPermission('access_facilities') || $this->ACL->hasPermission('access_users') || $this->ACL->hasPermission('access_practice') || $this->ACL->hasPermission('access_services') || $this->ACL->hasPermission('access_roles') || $this->ACL->hasPermission('access_layouts') || $this->ACL->hasPermission('access_lists') || $this->ACL->hasPermission('access_event_log')) {
         array_push($nav, array('text' => 'Administration', 'cls' => 'folder', 'expanded' => false, 'children' => array(array('text' => 'Global Settings', 'disabled' => $this->ACL->hasPermission('access_gloabal_settings') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelGlobals'), array('text' => 'Facilities', 'disabled' => $this->ACL->hasPermission('access_facilities') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelFacilities'), array('text' => 'Users', 'disabled' => $this->ACL->hasPermission('access_users') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelUsers'), array('text' => 'Practice', 'disabled' => $this->ACL->hasPermission('access_practice') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelPractice'), array('text' => 'Services', 'disabled' => $this->ACL->hasPermission('access_services') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelServices'), array('text' => 'Roles', 'disabled' => $this->ACL->hasPermission('access_roles') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelRoles'), array('text' => 'Layouts', 'disabled' => $this->ACL->hasPermission('access_layouts') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLayout'), array('text' => 'Lists', 'disabled' => $this->ACL->hasPermission('access_lists') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLists'), array('text' => 'Event Log', 'disabled' => $this->ACL->hasPermission('access_event_log') ? false : true, 'leaf' => true, 'cls' => 'file', 'id' => 'panelLog'))));
     }
     // *************************************************************************************
     // Miscellaneous Folder
     // *************************************************************************************
     array_push($nav, array('text' => 'Miscellaneous', 'cls' => 'folder', 'expanded' => true, 'children' => array(array('text' => 'Web Search', 'leaf' => true, 'cls' => 'file', 'id' => 'panelWebsearch'), array('text' => 'Address Book', 'leaf' => true, 'cls' => 'file', 'id' => 'panelAddressbook'), array('text' => 'Office Notes', 'leaf' => true, 'cls' => 'file', 'id' => 'panelOfficeNotes'), array('text' => 'My Settings', 'leaf' => true, 'cls' => 'file', 'id' => 'panelMySettings'), array('text' => 'My Account', 'leaf' => true, 'cls' => 'file', 'id' => 'panelMyAccount'))));
     return $nav;
 }
开发者ID:ameenalvi,项目名称:MitosEHR-Official,代码行数:27,代码来源:Navigation.php

示例4: getNavigation

 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = array(array('text' => $this->i18n['dashboard'], 'disabled' => $this->ACL->hasPermission('access_dashboard') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'panelDashboard'), array('text' => $this->i18n['calendar'], 'disabled' => $this->ACL->hasPermission('access_calendar') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoCalendar', 'id' => 'panelCalendar'), array('text' => $this->i18n['messages'], 'disabled' => $this->ACL->hasPermission('access_messages') ? false : true, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'mail', 'id' => 'panelMessages'), array('text' => $this->i18n['area_floor_plan'], 'disabled' => false, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoZoneAreas', 'id' => 'panelAreaFloorPlan'), array('text' => $this->i18n['patient_pool_areas'], 'disabled' => false, 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoPoolArea16', 'id' => 'panelPoolArea'));
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     $patient = array('text' => $this->i18n['patient'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationPatient');
     if ($this->ACL->hasPermission('add_patient')) {
         $patient['children'][] = array('text' => $this->i18n['new_patient'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelNewPatient');
     }
     if ($this->ACL->hasPermission('access_patient_summary')) {
         $patient['children'][] = array('text' => $this->i18n['patient_summary'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelSummary');
     }
     if ($this->ACL->hasPermission('access_patient_visits')) {
         $patient['children'][] = array('text' => $this->i18n['visits_history'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisits');
     }
     if ($this->ACL->hasPermission('access_encounters')) {
         $patient['children'][] = array('text' => $this->i18n['encounter'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelEncounter');
     }
     if ($this->ACL->hasPermission('access_visit_checkout')) {
         $patient['children'][] = array('text' => $this->i18n['visit_checkout'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelVisitCheckout');
     }
     array_push($nav, $patient);
     // *************************************************************************************
     // Billing Manager Folder
     // *************************************************************************************
     array_push($nav, array('text' => $this->i18n['billing_manager'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationBilling', 'children' => array(array('text' => $this->i18n['payment'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPayments'), array('text' => $this->i18n['billing'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelBilling'))));
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     $admin = array('text' => $this->i18n['administration'], 'cls' => 'folder', 'expanded' => true, 'id' => 'navigationAdministration');
     if ($this->ACL->hasPermission('access_gloabal_settings')) {
         $admin['children'][] = array('text' => $this->i18n['global_settings'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelGlobals');
     }
     if ($this->ACL->hasPermission('access_facilities')) {
         $admin['children'][] = array('text' => $this->i18n['facilities'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFacilities');
     }
     if ($this->ACL->hasPermission('access_users')) {
         $admin['children'][] = array('text' => $this->i18n['users'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelUsers');
     }
     if ($this->ACL->hasPermission('access_practice')) {
         $admin['children'][] = array('text' => $this->i18n['practice'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPractice');
     }
     if ($this->ACL->hasPermission('access_data_manager')) {
         $admin['children'][] = array('text' => $this->i18n['data_manager'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelDataManager');
     }
     if ($this->ACL->hasPermission('access_preventive_care')) {
         $admin['children'][] = array('text' => $this->i18n['preventive_care'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelPreventiveCare');
     }
     //		if($this->ACL->hasPermission('access_medications')){
     //			$admin['children'][] = array(
     //				'text' => $this->i18n['medications'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMedications'
     //			);
     //		}
     if ($this->ACL->hasPermission('access_floor_plans')) {
         $admin['children'][] = array('text' => $this->i18n['floor_areas'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelFloorPlans');
     }
     if ($this->ACL->hasPermission('access_roles')) {
         $admin['children'][] = array('text' => $this->i18n['roles'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelRoles');
     }
     if ($this->ACL->hasPermission('access_layouts')) {
         $admin['children'][] = array('text' => $this->i18n['layouts'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLayout');
     }
     if ($this->ACL->hasPermission('access_lists')) {
         $admin['children'][] = array('text' => $this->i18n['lists'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLists');
     }
     if ($this->ACL->hasPermission('access_event_log')) {
         $admin['children'][] = array('text' => $this->i18n['event_log'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelLog');
     }
     if ($this->ACL->hasPermission('access_documents')) {
         $admin['children'][] = array('text' => $this->i18n['documents'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelDocuments');
     }
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['external_data_loads'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelExternalDataLoads');
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['applications'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelApplications');
     //}
     //if($this->ACL->hasPermission('access_documents')){
     $admin['children'][] = array('text' => $this->i18n['modules'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelModules');
     //}
     if ($this->ACL->hasPermission('access_gloabal_settings') || $this->ACL->hasPermission('access_facilities') || $this->ACL->hasPermission('access_users') || $this->ACL->hasPermission('access_practice') || $this->ACL->hasPermission('access_services') || $this->ACL->hasPermission('access_medications') || $this->ACL->hasPermission('access_floor_plans') || $this->ACL->hasPermission('access_roles') || $this->ACL->hasPermission('access_layouts') || $this->ACL->hasPermission('access_lists') || $this->ACL->hasPermission('access_event_log')) {
         array_push($nav, $admin);
     }
     // *************************************************************************************
     // Miscellaneous Folder
     // *************************************************************************************
     array_push($nav, array('text' => $this->i18n['miscellaneous'], 'cls' => 'folder', 'expanded' => false, 'id' => 'navigationMiscellaneous', 'children' => array(array('text' => $this->i18n['web_search'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelWebsearch'), array('text' => $this->i18n['address_book'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelAddressbook'), array('text' => $this->i18n['office_notes'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelOfficeNotes'), array('text' => $this->i18n['my_settings'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMySettings'), array('text' => $this->i18n['my_account'], 'leaf' => true, 'cls' => 'file', 'id' => 'panelMyAccount'))));
     return $nav;
 }
开发者ID:nhom5UET,项目名称:tichhophethong,代码行数:93,代码来源:Navigation.php

示例5: getNavigation

 public function getNavigation()
 {
     // *************************************************************************************
     // Renders the items of the navigation panel
     // Default Nav Data
     // *************************************************************************************
     $nav = [];
     $nav[] = ['text' => $this->i18n('dashboard'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoDash', 'id' => 'App.view.dashboard.Dashboard'];
     //		if($this->ACL->hasPermission('access_calendar')){
     //			$nav[] = array(
     //				'text' => $this->i18n('calendar'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'iconCls' => 'icoCalendar',
     //				'id' => 'App.view.calendar.Calendar'
     //			);
     //		}
     //		if($this->ACL->hasPermission('access_messages')){
     //			$nav[] = array(
     //				'text' => $this->i18n('messages'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'iconCls' => 'mail',
     //				'id' => 'App.view.messages.Messages'
     //			);
     //		}
     //		$nav[] = array(
     //			'text' => $this->i18n('patient_search'),
     //			'disabled' => !$this->ACL->hasPermission('access_patient_search'),
     //			'leaf' => true,
     //			'cls' => 'file',
     //			'iconCls' => 'searchUsers',
     //			'id' => 'panelPatientSearch'
     //		);
     if ($this->ACL->hasPermission('access_floor_plan_panel')) {
         $nav[] = ['text' => $this->i18n('area_floor_plan'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoZoneAreas', 'id' => 'App.view.areas.FloorPlan'];
     }
     if ($this->ACL->hasPermission('access_pool_areas_panel')) {
         $nav[] = ['text' => $this->i18n('patient_pool_areas'), 'leaf' => true, 'cls' => 'file', 'iconCls' => 'icoPoolArea16', 'id' => 'App.view.areas.PatientPoolAreas'];
     }
     // *************************************************************************************
     // Patient Folder
     // *************************************************************************************
     $patient = ['text' => $this->i18n('patient'), 'cls' => 'folder', 'expanded' => true, 'iconCls' => 'icoLogo', 'id' => 'patient'];
     if ($this->ACL->hasPermission('add_patient')) {
         $patient['children'][] = ['text' => $this->i18n('new_patient'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.NewPatient'];
     }
     if ($this->ACL->hasPermission('access_patient_summary')) {
         $patient['children'][] = ['text' => $this->i18n('patient_summary'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Summary'];
     }
     if ($this->ACL->hasPermission('access_patient_visits')) {
         $patient['children'][] = ['text' => $this->i18n('visits_history'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Visits'];
     }
     if ($this->ACL->hasPermission('access_encounters')) {
         $patient['children'][] = ['text' => $this->i18n('encounter'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.Encounter'];
     }
     if ($this->ACL->hasPermission('access_visit_checkout')) {
         $patient['children'][] = ['text' => $this->i18n('visit_checkout'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.patient.VisitCheckout'];
     }
     array_push($nav, $patient);
     // *************************************************************************************
     // Billing Manager Folder
     // *************************************************************************************
     array_push($nav, ['text' => $this->i18n('billing_manager'), 'cls' => 'folder', 'expanded' => true, 'id' => 'billing', 'iconCls' => 'icoLogo', 'children' => [['text' => $this->i18n('payment'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.fees.Payments'], ['text' => $this->i18n('billing'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.fees.Billing']]]);
     // *************************************************************************************
     // Administration Folder
     // *************************************************************************************
     $admin = ['text' => $this->i18n('administration'), 'cls' => 'folder', 'expanded' => true, 'iconCls' => 'icoLogo', 'id' => 'administration'];
     if ($this->ACL->hasPermission('access_gloabal_settings')) {
         $admin['children'][] = ['text' => $this->i18n('global_settings'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Globals'];
     }
     //		if($this->ACL->hasPermission('access_facilities')){
     //			$admin['children'][] = array(
     //				'text' => $this->i18n('facilities'),
     //				'leaf' => true,
     //				'cls' => 'file',
     //				'id' => 'App.view.administration.Facilities'
     //			);
     //		}
     if ($this->ACL->hasPermission('access_users')) {
         $admin['children'][] = ['text' => $this->i18n('users'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Users'];
     }
     if ($this->ACL->hasPermission('access_practice')) {
         $admin['children'][] = ['text' => $this->i18n('practice'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.practice.Practice'];
     }
     if ($this->ACL->hasPermission('access_data_manager')) {
         $admin['children'][] = ['text' => $this->i18n('data_manager'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.DataManager'];
     }
     if ($this->ACL->hasPermission('access_preventive_care')) {
         $admin['children'][] = ['text' => $this->i18n('decision_support'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.DecisionSupport'];
     }
     if ($this->ACL->hasPermission('access_floor_plans')) {
         $admin['children'][] = ['text' => $this->i18n('floor_areas'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.FloorPlans'];
     }
     if ($this->ACL->hasPermission('access_roles')) {
         $admin['children'][] = ['text' => $this->i18n('roles'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Roles'];
     }
     if ($this->ACL->hasPermission('access_layouts')) {
         $admin['children'][] = ['text' => $this->i18n('layouts'), 'leaf' => true, 'cls' => 'file', 'id' => 'App.view.administration.Layout'];
     }
//.........这里部分代码省略.........
开发者ID:igez,项目名称:gaiaehr,代码行数:101,代码来源:Navigation.php

示例6: ACL

 * revision: N/A
 * author: Ernesto J Rodriguez
 *
 */
if (!isset($_SESSION)) {
    session_name("MitosEHR");
    session_start();
    session_cache_limiter('private');
}
include_once $_SESSION['site']['root'] . "/classes/ACL.php";
$ACL = new ACL();
?>

perm = {
    access_dashboard    : <?php 
print $ACL->hasPermission('access_dashboard') ? 'true' : 'false';
?>
,
    access_calendar     : <?php 
print $ACL->hasPermission('access_calendar') ? 'true' : 'false';
?>
,
    access_messages     : <?php 
print $ACL->hasPermission('access_messages') ? 'true' : 'false';
?>
,
    search_patient      : <?php 
print $ACL->hasPermission('search_patient') ? 'true' : 'false';
?>
,
开发者ID:ameenalvi,项目名称:MitosEHR-Official,代码行数:30,代码来源:registry.js.php

示例7: ACL

    ?>
)</h2>
							<form action="users.php" method="post">
								<table border="0" cellpadding="5" cellspacing="0">
									<tr>
										<th></th><th></th>
									</tr>
									<?php 
    $userACL = new ACL($_GET['userID']);
    $rPerms = $userACL->perms;
    $aPerms = $userACL->getAllPerms('full');
    foreach ($aPerms as $k => $v) {
        echo "\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>" . $v['Name'] . "</td>";
        echo "<td>\n\t\t\t\t\t\t\t\t\t\t<select name=\"perm_" . $v['ID'] . "\">";
        echo "<option value=\"1\"";
        if ($userACL->hasPermission($v['Key']) && $rPerms[$v['Key']]['inheritted'] != true) {
            echo " selected=\"selected\"";
        }
        echo ">Allow</option>";
        echo "<option value=\"0\"";
        if ($rPerms[$v['Key']]['value'] === false && $rPerms[$v['Key']]['inheritted'] != true) {
            echo " selected=\"selected\"";
        }
        echo ">Deny</option>";
        echo "<option value=\"x\"";
        if ($rPerms[$v['Key']]['inheritted'] == true || !array_key_exists($v['Key'], $rPerms)) {
            echo " selected=\"selected\"";
            if ($rPerms[$v['Key']]['value'] === true) {
                $iVal = '(Allow)';
            } else {
                $iVal = '(Deny)';
开发者ID:juslee,项目名称:e27,代码行数:31,代码来源:users.php

示例8: ACL

								<a href="admin/admin_index.php" class="user_admin">User Admin</a>
							</li>
						</ul>
					</div>

					<div class="clear"></div>
					<div id="table-content">
						<div id="page" style="text-align:left;">
							<h2>Permissions for </h2>
							<?php 
$userACL = new ACL($userID);
$aPerms = $userACL->getAllPerms('full');
foreach ($aPerms as $k => $v) {
    echo "<strong>" . $v['Name'] . ": </strong>";
    echo "<img src=\"../img/";
    if ($userACL->hasPermission($v['Key']) === true) {
        echo "allow.png";
        $pVal = "Allow";
    } else {
        echo "deny.png";
        $pVal = "Deny";
    }
    echo "\" width=\"16\" height=\"16\" alt=\"{$pVal}\" />\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t";
}
?>
							<h3>Change User:</h3>
							<?php 
$strSQL = "SELECT * FROM `users` ORDER BY `users_username` ASC";
$data = mysql_query($strSQL);
while ($row = mysql_fetch_assoc($data)) {
    echo "<a href=\"?userID=" . $row['users_id'] . "\">" . $row['users_username'] . "</a><br />";
开发者ID:juslee,项目名称:e27,代码行数:31,代码来源:login_index.php


注:本文中的ACL::hasPermission方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。