View Revisions: Issue #16801

Summary 16801: Permission function by model review
Revision 2021-01-06 11:13 by DenisChenu
Steps To Reproduce Alternate solution :

LSActiveRecord->model()->findByPk()->hasPermission()

````
function hasPermission($objectId, $permission, $crud, $userId) {
    return Permission::hasPermission(0, 'global', get_class($this), $crud , $userId)
        || Permission::hasPermission($objectId, get_class($this), $permission, $crud , $userId);
}
````

Extend in Survey, SurveysGroups, SurveysInGroup (currently)

Set @deprecated for hasSurveyPermission
remove hasSurveysGroupsPermission and hasSurveysInGroupPermission
Check for hasRolePermission, hasTemplatePermission and hasGlobalPermission
Revision 2020-10-31 11:40 by DenisChenu
Steps To Reproduce