Add some defaults to select-bitwise if no app is specified

This commit is contained in:
nathangray 2019-04-09 11:45:14 -06:00
parent fa8381c229
commit ff120e64da

View File

@ -803,6 +803,21 @@ class Select extends Etemplate\Widget
{
$options += (array)Api\Hooks::single(array('location' => 'acl_rights'), $appname);
}
else
{
$options += array(
'run' => 'Run',
Api\Acl::READ => 'Read',
Api\Acl::ADD => 'Add',
Api\Acl::EDIT => 'Edit',
Api\Acl::DELETE => 'Delete',
Api\Acl::PRIVAT => 'Private',
Api\Acl::GROUPMGRS => 'Group managers',
Api\Acl::CUSTOM1 => 'Custom 1',
Api\Acl::CUSTOM2 => 'Custom 2',
Api\Acl::CUSTOM3 => 'Custom 3',
);
}
foreach((array)$options as $right => $name)
{
if(!!($value & $right))