mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
mlanthaler: Bugfix: *Permission_groupList* is not a defined constant.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41956 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
44a74482e0
commit
d6a68f8993
@ -217,11 +217,11 @@ class Permission extends DataObject {
|
||||
|
||||
static function get_codes($blankItemText = null) {
|
||||
$classes = ClassInfo::implementorsOf('PermissionProvider');
|
||||
|
||||
|
||||
$allCodes = array();
|
||||
if($blankItemText) $allCodes[''] = ($blankItemText === true) ? '(select)' : $blankItemText;
|
||||
$allCodes['ADMIN'] = 'Full administrative rights';
|
||||
|
||||
|
||||
foreach($classes as $class) {
|
||||
$SNG = singleton($class);
|
||||
$someCodes = $SNG->providePermissions();
|
||||
@ -244,7 +244,7 @@ class Permission extends DataObject {
|
||||
*/
|
||||
function listcodes() {
|
||||
if(!Permission::check('ADMIN')) Security::permissionFailure();
|
||||
|
||||
|
||||
echo "<h1>The following permission codes are defined</h1>";
|
||||
$codes = self::get_codes();
|
||||
echo "<pre>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user