Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
16801Development Otherpublic2021-01-12 13:46
ReporterDenisChenu Assigned Toollehar  
Status testingResolutionopen 
Product Version3.x 
Summary16801: Permission function by model review
DescriptionCurrent function can/must be static.There are permission function that clearly don't need model i think they must eb moved to static function keep the dynamic one as deprecated since it can be used by Plugins.

Steps To ReproduceAlternate solution :


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
Additional InformationFunction :
- [hasPermission](
- [hasGlobalPermission](
- [hasSurveyPermission](
- [hasRolePermission](
- [hasTemplatePermission](

About all hasEntityPermission : did we create new one or use a global one for future ?
TagsNo tags attached.


parent of 16440 testingcdorin Feature requests Survey group Permission : minimal system 
Not all the children of this issue are yet resolved or closed.




2021-01-12 13:45

developer   ~61493


2021-01-12 13:46

developer   ~61494

Template and Role don't use `Permission::setPermission` and other function :)

Issue History

Date Modified Username Field Change
2020-10-31 11:40 DenisChenu New Issue
2020-10-31 11:41 DenisChenu Relationship added parent of 16440
2021-01-06 11:13 DenisChenu Summary Some Permission function can/must be static => Permission function by model review
2021-01-06 11:13 DenisChenu Description Updated View Revisions
2021-01-06 11:13 DenisChenu Steps to Reproduce Updated View Revisions
2021-01-06 11:16 ollehar Issue Monitored: ollehar
2021-01-12 13:45 DenisChenu Assigned To => ollehar
2021-01-12 13:45 DenisChenu Status new => testing
2021-01-12 13:45 DenisChenu Note Added: 61493
2021-01-12 13:46 DenisChenu Note Added: 61494