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])
Show file Open project: openeyes/openeyes

Protected Properties

Property Type Description
$event_type EventType
$yii

Public Methods

Method 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.

Protected Methods

Method Description
getEventType ( ) : EventType

Private Methods

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

Method Details

__construct() public method

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

canCreateOphCoCvi() public method

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
return boolean

canEditClinicalOphCoCvi() public method

public canEditClinicalOphCoCvi ( $user_id ) : boolean
$user_id
return boolean

canEditOphCoCvi() public method

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
return boolean

getEventType() protected method

protected getEventType ( ) : EventType
return EventType

Property Details

$event_type protected property

protected EventType $event_type
return EventType

$yii protected property

protected $yii