-<?php namespace BookStack\Auth;
+<?php
+
+namespace BookStack\Auth;
use BookStack\Auth\Permissions\JointPermission;
use BookStack\Auth\Permissions\RolePermission;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
- * Class Role
- * @property int $id
+ * Class Role.
+ *
+ * @property int $id
* @property string $display_name
* @property string $description
* @property string $external_auth_id
* @property string $system_name
+ * @property bool $mfa_enforced
*/
class Role extends Model implements Loggable
{
-
protected $fillable = ['display_name', 'description', 'external_auth_id'];
/**
return true;
}
}
+
return false;
}
}
/**
- * Get all visible roles
+ * Get all visible roles.
*/
public static function visible(): Collection
{
*/
public static function restrictable(): Collection
{
- return static::query()->where('system_name', '!=', 'admin')->get();
+ return static::query()
+ ->where('system_name', '!=', 'admin')
+ ->orderBy('display_name', 'asc')
+ ->get();
}
/**