HOR-3841
This commit is contained in:
@@ -1747,6 +1747,12 @@ msgstr "Databases Source List"
|
|||||||
msgid "Changes saved"
|
msgid "Changes saved"
|
||||||
msgstr "Changes saved"
|
msgstr "Changes saved"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_SELECT_USER_OR_GROUP
|
||||||
|
#: LABEL/ID_SELECT_USER_OR_GROUP
|
||||||
|
msgid "Please select the name of a user or a group in the Group or User field"
|
||||||
|
msgstr "Please select the name of a user or a group in the Group or User field"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_EMAILS
|
# LABEL/ID_EMAILS
|
||||||
#: LABEL/ID_EMAILS
|
#: LABEL/ID_EMAILS
|
||||||
@@ -27869,12 +27875,6 @@ msgstr "NOT IMPORTED"
|
|||||||
msgid "CANNOT IMPORT"
|
msgid "CANNOT IMPORT"
|
||||||
msgstr "CANNOT IMPORT"
|
msgstr "CANNOT IMPORT"
|
||||||
|
|
||||||
# TRANSLATION
|
|
||||||
# LABEL/ID_SELECT_USER_OR_GROUP
|
|
||||||
#: LABEL/ID_SELECT_USER_OR_GROUP
|
|
||||||
msgid "Please select the name of a user or a group in the Group or User field"
|
|
||||||
msgstr "Please select the name of a user or a group in the Group or User field"
|
|
||||||
|
|
||||||
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
|
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
|
||||||
# additionalTables/additionalTablesData.xml
|
# additionalTables/additionalTablesData.xml
|
||||||
#: text - ADD_TAB_NAME
|
#: text - ADD_TAB_NAME
|
||||||
|
|||||||
@@ -224,6 +224,9 @@ class ProcessPermissions
|
|||||||
if ($opUid != '') {
|
if ($opUid != '') {
|
||||||
$opUid = $this->validateOpUid($opUid);
|
$opUid = $this->validateOpUid($opUid);
|
||||||
}
|
}
|
||||||
|
if (empty($data['USR_UID']) || $data['USR_UID'] === "null") {
|
||||||
|
throw (new \Exception(\G::LoadTranslation("ID_SELECT_USER_OR_GROUP")));
|
||||||
|
}
|
||||||
if ($data['OP_USER_RELATION'] == "1") {
|
if ($data['OP_USER_RELATION'] == "1") {
|
||||||
$this->validateUsrUid($data['USR_UID']);
|
$this->validateUsrUid($data['USR_UID']);
|
||||||
} else {
|
} else {
|
||||||
@@ -381,7 +384,7 @@ class ProcessPermissions
|
|||||||
{
|
{
|
||||||
$usr_uid = trim($usr_uid);
|
$usr_uid = trim($usr_uid);
|
||||||
if ($usr_uid == '') {
|
if ($usr_uid == '') {
|
||||||
throw (new \Exception(\G::LoadTranslation("ID_SELECT_USER_OR_GROUP")));
|
throw (new \Exception(\G::LoadTranslation("ID_USER_NOT_EXIST", array('usr_uid',''))));
|
||||||
}
|
}
|
||||||
$oUsers = new \Users();
|
$oUsers = new \Users();
|
||||||
if (!($oUsers->userExists($usr_uid))) {
|
if (!($oUsers->userExists($usr_uid))) {
|
||||||
@@ -403,7 +406,7 @@ class ProcessPermissions
|
|||||||
{
|
{
|
||||||
$grp_uid = trim($grp_uid);
|
$grp_uid = trim($grp_uid);
|
||||||
if ($grp_uid == '') {
|
if ($grp_uid == '') {
|
||||||
throw (new \Exception(\G::LoadTranslation("ID_SELECT_USER_OR_GROUP")));
|
throw (new \Exception(\G::LoadTranslation("ID_GROUP_NOT_EXIST", array('grp_uid',''))));
|
||||||
}
|
}
|
||||||
$oGroup = new \Groupwf();
|
$oGroup = new \Groupwf();
|
||||||
if (!($oGroup->GroupwfExists($grp_uid))) {
|
if (!($oGroup->GroupwfExists($grp_uid))) {
|
||||||
|
|||||||
@@ -58,44 +58,22 @@ class ProcessPermissions extends Api
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Creates a new Process Permission for a project.
|
||||||
|
*
|
||||||
|
* @url POST /:prj_uid/process-permission/
|
||||||
|
* @status 201
|
||||||
|
*
|
||||||
* @param string $prj_uid {@min 1} {@max 32}
|
* @param string $prj_uid {@min 1} {@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
*
|
*
|
||||||
* @param string $usr_uid {@from body} {@min 1} {@max 32}
|
|
||||||
* @param string $op_user_relation {@from body} {@choice 1,2}
|
|
||||||
* @param string $op_case_status {@from body} {@choice ALL,DRAFT,TO_DO,PAUSED,COMPLETED}
|
|
||||||
* @param string $op_participate {@from body} {@choice 0,1}
|
|
||||||
* @param string $op_obj_type {@from body} {@choice ANY,DYNAFORM,ATTACHMENT,INPUT,OUTPUT,CASES_NOTES,MSGS_HISTORY,SUMMARY_FORM}
|
|
||||||
* @param string $op_action {@from body} {@choice VIEW,BLOCK,DELETE,RESEND}
|
|
||||||
* @param string $tas_uid {@from body}
|
|
||||||
* @param string $op_task_source {@from body}
|
|
||||||
* @param string $dynaforms {@from body}
|
|
||||||
* @param string $inputs {@from body}
|
|
||||||
* @param string $outputs {@from body}
|
|
||||||
*
|
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
|
||||||
* @copyright Colosa - Bolivia
|
|
||||||
*
|
|
||||||
* @return array
|
* @return array
|
||||||
*
|
* @throws RestException
|
||||||
* @url POST /:prj_uid/process-permission/
|
*
|
||||||
* @status 201
|
* @access protected
|
||||||
|
* @class AccessControl {@permission PM_FACTORY}
|
||||||
*/
|
*/
|
||||||
public function doPostProcessPermission(
|
public function doPostProcessPermission($prj_uid, $request_data)
|
||||||
$prj_uid,
|
{
|
||||||
$request_data,
|
|
||||||
$usr_uid,
|
|
||||||
$op_user_relation,
|
|
||||||
$op_case_status,
|
|
||||||
$op_participate,
|
|
||||||
$op_obj_type,
|
|
||||||
$op_action,
|
|
||||||
$tas_uid = '',
|
|
||||||
$op_task_source = '',
|
|
||||||
$dynaforms = '',
|
|
||||||
$inputs = '',
|
|
||||||
$outputs = ''
|
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
$hiddenFields = array('task_target', 'group_user', 'task_source',
|
$hiddenFields = array('task_target', 'group_user', 'task_source',
|
||||||
'object_type', 'object', 'participated', 'action'
|
'object_type', 'object', 'participated', 'action'
|
||||||
|
|||||||
Reference in New Issue
Block a user