parent
cb85557671
commit
3266f220b9
|
@ -114,6 +114,7 @@ class SubuserRepository
|
|||
|
||||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
// Determine if this user exists or if we need to make them an account.
|
||||
$user = Models\User::where('email', $data['email'])->first();
|
||||
if (!$user) {
|
||||
|
@ -157,7 +158,6 @@ class SubuserRepository
|
|||
// Contact Daemon
|
||||
// We contact even if they don't have any daemon permissions to overwrite
|
||||
// if they did have them previously.
|
||||
try {
|
||||
|
||||
$node = Models\Node::getByID($server->node);
|
||||
$client = Models\Node::guzzleRequest($server->node);
|
||||
|
@ -210,9 +210,9 @@ class SubuserRepository
|
|||
|
||||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Models\Permission::where('user_id', $subuser->user_id)->where('server_id', $subuser->server_id)->delete();
|
||||
|
||||
try {
|
||||
$node = Models\Node::getByID($server->node);
|
||||
$client = Models\Node::guzzleRequest($server->node);
|
||||
|
||||
|
@ -265,6 +265,8 @@ class SubuserRepository
|
|||
$server = Models\Server::findOrFail($data['server']);
|
||||
|
||||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Models\Permission::where('user_id', $subuser->user_id)->where('server_id', $subuser->server_id)->delete();
|
||||
|
||||
$daemonPermissions = $this->coreDaemonPermissions;
|
||||
|
@ -287,7 +289,6 @@ class SubuserRepository
|
|||
// Contact Daemon
|
||||
// We contact even if they don't have any daemon permissions to overwrite
|
||||
// if they did have them previously.
|
||||
try {
|
||||
$node = Models\Node::getByID($server->node);
|
||||
$client = Models\Node::guzzleRequest($server->node);
|
||||
|
||||
|
|
Loading…
Reference in New Issue