mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Use beginning of UUID for server uuidShort
This commit is contained in:
@@ -303,6 +303,18 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
|
||||
return $this->getServersForPowerAction($servers, $nodes, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given UUID and UUID-Short string are unique to a server.
|
||||
*
|
||||
* @param string $uuid
|
||||
* @param string $short
|
||||
* @return bool
|
||||
*/
|
||||
public function isUniqueUuidCombo(string $uuid, string $short): bool
|
||||
{
|
||||
return ! $this->getBuilder()->where('uuid', '=', $uuid)->orWhere('uuidShort', '=', $short)->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of server IDs that a given user can access based
|
||||
* on owner and subuser permissions.
|
||||
|
||||
Reference in New Issue
Block a user