IDEMPIERE-3664 New Role - User Assignment
This commit is contained in:
parent
193b7cae19
commit
dcd5e0421f
|
@ -0,0 +1,15 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3664
|
||||||
|
-- Mar 22, 2018 10:16:54 AM BRT
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200116,0,0,TO_DATE('2018-03-22 10:16:53','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2018-03-22 10:16:53','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','AUTO_ASSIGN_ROLE_TO_CREATOR_USER','N','Defines if a role is assigned to the creator user when creating a new role ','D','S','dc4be8d1-a164-4e6d-8e02-be6c498d1669')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Mar 22, 2018 10:17:03 AM BRT
|
||||||
|
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_DATE('2018-03-22 10:17:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=200116
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201803221017_IDEMPIERE-3664.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
-- IDEMPIERE-3664
|
||||||
|
-- Mar 22, 2018 10:16:54 AM BRT
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200116,0,0,TO_TIMESTAMP('2018-03-22 10:16:53','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-03-22 10:16:53','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','AUTO_ASSIGN_ROLE_TO_CREATOR_USER','N','Defines if a role is assigned to the creator user when creating a new role ','D','S','dc4be8d1-a164-4e6d-8e02-be6c498d1669')
|
||||||
|
;
|
||||||
|
|
||||||
|
-- Mar 22, 2018 10:17:03 AM BRT
|
||||||
|
UPDATE AD_SysConfig SET ConfigurationLevel='C',Updated=TO_TIMESTAMP('2018-03-22 10:17:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=200116
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201803221017_IDEMPIERE-3664.sql') FROM dual
|
||||||
|
;
|
||||||
|
|
|
@ -371,7 +371,7 @@ public final class MRole extends X_AD_Role
|
||||||
MUserRoles su = new MUserRoles(getCtx(), SUPERUSER_USER_ID, getAD_Role_ID(), get_TrxName());
|
MUserRoles su = new MUserRoles(getCtx(), SUPERUSER_USER_ID, getAD_Role_ID(), get_TrxName());
|
||||||
su.saveEx();
|
su.saveEx();
|
||||||
// Add Role to User
|
// Add Role to User
|
||||||
if (getCreatedBy() != SUPERUSER_USER_ID)
|
if (getCreatedBy() != SUPERUSER_USER_ID && MSysConfig.getBooleanValue(MSysConfig.AUTO_ASSIGN_ROLE_TO_CREATOR_USER, false, getAD_Client_ID()))
|
||||||
{
|
{
|
||||||
MUserRoles ur = new MUserRoles(getCtx(), getCreatedBy(), getAD_Role_ID(), get_TrxName());
|
MUserRoles ur = new MUserRoles(getCtx(), getCreatedBy(), getAD_Role_ID(), get_TrxName());
|
||||||
ur.saveEx();
|
ur.saveEx();
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2617379167881737860L;
|
private static final long serialVersionUID = -2698648078997788547L;
|
||||||
|
|
||||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||||
|
@ -61,6 +61,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN";
|
public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN";
|
||||||
public static final String APPLICATION_URL = "APPLICATION_URL";
|
public static final String APPLICATION_URL = "APPLICATION_URL";
|
||||||
public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK";
|
public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK";
|
||||||
|
public static final String AUTO_ASSIGN_ROLE_TO_CREATOR_USER = "AUTO_ASSIGN_ROLE_TO_CREATOR_USER";
|
||||||
public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS";
|
public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS";
|
||||||
public static final String AUTOMATIC_PACKIN_INITIAL_DELAY = "AUTOMATIC_PACKIN_INITIAL_DELAY";
|
public static final String AUTOMATIC_PACKIN_INITIAL_DELAY = "AUTOMATIC_PACKIN_INITIAL_DELAY";
|
||||||
public static final String AUTOMATIC_PACKIN_PROCESSING = "AUTOMATIC_PACKIN_PROCESSING";
|
public static final String AUTOMATIC_PACKIN_PROCESSING = "AUTOMATIC_PACKIN_PROCESSING";
|
||||||
|
|
Loading…
Reference in New Issue