working with permissions

This commit is contained in:
David Bomba 2016-05-09 10:02:15 +10:00
parent f6abdedfac
commit 985c4eda34
2 changed files with 2 additions and 2 deletions

View File

@ -33,8 +33,6 @@ class UserAccountTransformer extends EntityTransformer
'account_key' => $user->account->account_key, 'account_key' => $user->account->account_key,
'name' => $user->account->present()->name, 'name' => $user->account->present()->name,
'token' => $user->account->getToken($user->id, $this->tokenName), 'token' => $user->account->getToken($user->id, $this->tokenName),
'is_admin' => (bool) $user->is_admin,
'permissions' => $user->permissions,
'default_url' => SITE_URL 'default_url' => SITE_URL
]; ];
} }

View File

@ -26,6 +26,8 @@ class UserTransformer extends EntityTransformer
'notify_viewed' => (bool) $user->notify_viewed, 'notify_viewed' => (bool) $user->notify_viewed,
'notify_paid' => (bool) $user->notify_paid, 'notify_paid' => (bool) $user->notify_paid,
'notify_approved' => (bool) $user->notify_approved, 'notify_approved' => (bool) $user->notify_approved,
'is_admin' => (bool) $user->is_admin,
'permissions' => $user->getPermissions,
]; ];
} }
} }