public function BynderMediaApi::hasUploadPermissions in Bynder 7
File
- includes/
BynderMediaApi.inc, line 186 - Manages the Bynder media browser functionality
Class
Code
public function hasUploadPermissions() {
$user = $this->bynderApi
->getCurrentUser()
->wait();
if (isset($user)) {
$profileId = $user['profileId'];
$userProfile = $this->bynderApi
->getSecurityProfile($profileId)
->wait();
foreach ($userProfile['roles'] as $role) {
if ($role == 'MEDIAUPLOAD' || $role == 'MEDIAUPLOADFORAPPROVAL') {
return true;
}
}
}
return false;
}