I am working on activecollab custom module, facing problem in permissions; I have added permissions with the help of "on_system_permissions.php" handler. But the thing is how can I check this on code that either the logged in user have permission of specific action or not ..
I got below code from activecollab other module:
class Role extends FwRole implements IHomescreen {
..
..
function isPeopleManager(){
$this->getPermissionValue('can_manage_people');
}
...
...
}
Is that to check permission of any action? or it just return a value of that action?
In above class they are using $this-> and extending a class by FwRole .. When i using FwRole::getPermissionValue('can_manage_people');
to get return it gives me error of $this and object ..
So my question is how we can check permission of specific action in code and how i can use getPermissionValue() function to retrieve permission either yes or not ..