ProcessMaker-BE "Role and Permission (Endpoints)"
- Se han implementado los siguientes Endpoints:
GET /api/1.0/{workspace}/role/{rol_uid}/permissions?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/role/{rol_uid}/available-permissions?filter={filter}&start={start}&limit={limit}
POST /api/1.0/{workspace}/role/{rol_uid}/permission
DELETE /api/1.0/{workspace}/role/{rol_uid}/permission/{per_uid}
This commit is contained in:
@@ -483,6 +483,27 @@ class Process
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if does not exist the Permission in table PERMISSIONS (Database RBAC)
|
||||
*
|
||||
* @param string $permissionUid Unique id of Permission
|
||||
* @param string $fieldNameForException Field name for the exception
|
||||
*
|
||||
* return void Throw exception if does not exist the Permission in table PERMISSIONS
|
||||
*/
|
||||
public function throwExceptionIfNotExistsPermission($permissionUid, $fieldNameForException)
|
||||
{
|
||||
try {
|
||||
$obj = \PermissionsPeer::retrieveByPK($permissionUid);
|
||||
|
||||
if (is_null($obj)) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_PERMISSION_DOES_NOT_EXIST", array($fieldNameForException, $permissionUid)));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Process
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user