8 * Provides a method for validating database object permissions.
10 * @author Matthias Schmidt
11 * @copyright 2001-2019 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 trait TDatabaseObjectPermissions
18 * Returns true if the active user has at least one permission required
23 public function validatePermissions()
25 if ($this->permissions
) {
26 $permissions = \
explode(',', $this->permissions
);
27 foreach ($permissions as $permission) {
28 if (WCF
::getSession()->getPermission($permission)) {