PHP Class OEModule\OphCoCvi\components\OphCoCvi_AuthRules

(C) OpenEyes Foundation, 2016 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes ([email protected])
Afficher le fichier Open project: openeyes/openeyes

Protected Properties

Свойство Type Description
$event_type EventType
$yii

Méthodes publiques

Méthode Description
__construct ( CApplication $yii = null )
canCreateOphCoCvi ( $user_id, array $view_context = [] ) : boolean Biz rule for RBAC. if only the user id is provided, determines whether the user for the id has permissions for creating a CVI event.
canEditClinicalOphCoCvi ( $user_id ) : boolean
canEditOphCoCvi ( $user_id, array $view_context = [] ) : boolean Biz rule for RBAC. if only the user id is provided, determines whether the user for the id has permissions for editing a CVI event.

Méthodes protégées

Méthode Description
getEventType ( ) : EventType

Private Methods

Méthode Description
canEdit ( $user_id, boolean $clerical = false ) : boolean Root permission checking function for edit ability

Method Details

__construct() public méthode

public __construct ( CApplication $yii = null )
$yii CApplication

canCreateOphCoCvi() public méthode

If the view context (containing a Firm and Episode) is provided, checks whether the context is correct for creating a CVI event in the episode.
public canCreateOphCoCvi ( $user_id, array $view_context = [] ) : boolean
$user_id
$view_context array
Résultat boolean

canEditClinicalOphCoCvi() public méthode

public canEditClinicalOphCoCvi ( $user_id ) : boolean
$user_id
Résultat boolean

canEditOphCoCvi() public méthode

If the view context (containing a Firm and Event) is provided, checks whether the context is correct for editing the given CVI Event object. NB Event checks are purely about view context, and does not account for business rules around the status of the event.
public canEditOphCoCvi ( $user_id, array $view_context = [] ) : boolean
$user_id
$view_context array array containing the currently selected firm and Event for editing
Résultat boolean

getEventType() protected méthode

protected getEventType ( ) : EventType
Résultat EventType

Property Details

$event_type protected_oe property

protected EventType $event_type
Résultat EventType

$yii protected_oe property

protected $yii