<?php namespace BookStack;
-
class Role extends Model
{
{
$permissions = $this->getRelationValue('permissions');
foreach ($permissions as $permission) {
- if ($permission->getRawAttribute('name') === $permissionName) return true;
+ if ($permission->getRawAttribute('name') === $permissionName) {
+ return true;
+ }
}
return false;
}
/**
* Get the role object for the specified role.
* @param $roleName
- * @return mixed
+ * @return Role
*/
public static function getRole($roleName)
{
/**
* Get the role object for the specified system role.
* @param $roleName
- * @return mixed
+ * @return Role
*/
public static function getSystemRole($roleName)
{
{
return static::where('hidden', '=', false)->orderBy('name')->get();
}
-
}