SuperUserRole.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
15 
16 /**
17  * SuperUserRole matches if the user has the super user attribute.
18  *
19  * @author ingo herwig <ingo@wemove.com>
20  */
22 
23  /**
24  * @see DynamicRole::match()
25  */
26  public function match(User $user, $resource) {
27  return $user->isSuperUser();
28  }
29 }
30 ?>
SuperUserRole matches if the user has the super user attribute.
DynamicRole is the interface for user roles based on attributes.
Definition: DynamicRole.php:20
isSuperUser()
Check if the user is super user (can't be inactive).
User is the interface for users.
Definition: User.php:18