mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Just moved some stuff around - no actual meaningful code changes
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
4ef0005e7c
commit
f08babfa8a
|
@ -586,6 +586,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
if ((Setting::getSettings()->two_factor_enabled == '1') && ($this->two_factor_optin == '1')) {
|
if ((Setting::getSettings()->two_factor_enabled == '1') && ($this->two_factor_optin == '1')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the 2FA is required for everyone so is implicitly active
|
// If the 2FA is required for everyone so is implicitly active
|
||||||
elseif (Setting::getSettings()->two_factor_enabled == '2') {
|
elseif (Setting::getSettings()->two_factor_enabled == '2') {
|
||||||
return true;
|
return true;
|
||||||
|
@ -594,18 +595,6 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the admin user who created this user
|
|
||||||
*
|
|
||||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
|
||||||
* @since [v6.0.5]
|
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
|
||||||
*/
|
|
||||||
public function createdBy()
|
|
||||||
{
|
|
||||||
return $this->belongsTo(\App\Models\User::class, 'created_by')->withTrashed();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether two-factor authorization is required and the user has activated it
|
* Check whether two-factor authorization is required and the user has activated it
|
||||||
* and enrolled a device
|
* and enrolled a device
|
||||||
|
@ -634,6 +623,19 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the admin user who created this user
|
||||||
|
*
|
||||||
|
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||||
|
* @since [v6.0.5]
|
||||||
|
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
||||||
|
*/
|
||||||
|
public function createdBy()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\User::class, 'created_by')->withTrashed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function decodePermissions()
|
public function decodePermissions()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue