Commit bee8281b by Nilu

adding role type Billing and Owner

parent b7918eda
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<column name="forgot_password_mail_send_date" type="Date" nullable="true"/> <column name="forgot_password_mail_send_date" type="Date" nullable="true"/>
<column name="forgot_password_key" type="String" nullable="true" length="10"/> <column name="forgot_password_key" type="String" nullable="true" length="10"/>
<column name="role_type" type="String" nullable="true" length="200"/> <column name="role_type" type="String" nullable="true" length="200"/>
<column name="roles" type="String" nullable="true" length="200"/>
<column name="phone" type="String" nullable="true" length="30"/> <column name="phone" type="String" nullable="true" length="30"/>
<column name="verification_mail_send_date" type="Date" nullable="true"/> <column name="verification_mail_send_date" type="Date" nullable="true"/>
<column name="verification_key" type="String" nullable="true" length="10"/> <column name="verification_key" type="String" nullable="true" length="10"/>
......
...@@ -11,6 +11,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -11,6 +11,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date datetime NULL, forgot_password_mail_send_date datetime NULL,
forgot_password_key varchar(10) NULL, forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL, role_type varchar(200) NULL,
roles varchar(200) NULL,
phone varchar(30) NULL, phone varchar(30) NULL,
verification_mail_send_date datetime NULL, verification_mail_send_date datetime NULL,
verification_key varchar(10) NULL, verification_key varchar(10) NULL,
......
...@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date date NULL, forgot_password_mail_send_date date NULL,
forgot_password_key varchar2(10) NULL, forgot_password_key varchar2(10) NULL,
role_type varchar2(200) NULL, role_type varchar2(200) NULL,
roles varchar2(200) NULL,
phone varchar2(30) NULL, phone varchar2(30) NULL,
verification_mail_send_date date NULL, verification_mail_send_date date NULL,
verification_key varchar2(10) NULL, verification_key varchar2(10) NULL,
......
...@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -12,6 +12,7 @@ CREATE TABLE oneit_sec_user_extension (
forgot_password_mail_send_date timestamp NULL, forgot_password_mail_send_date timestamp NULL,
forgot_password_key varchar(10) NULL, forgot_password_key varchar(10) NULL,
role_type varchar(200) NULL, role_type varchar(200) NULL,
roles varchar(200) NULL,
phone varchar(30) NULL, phone varchar(30) NULL,
verification_mail_send_date timestamp NULL, verification_mail_send_date timestamp NULL,
verification_key varchar(10) NULL, verification_key varchar(10) NULL,
......
...@@ -9,7 +9,9 @@ import com.stripe.exception.InvalidRequestException; ...@@ -9,7 +9,9 @@ import com.stripe.exception.InvalidRequestException;
import com.stripe.model.Customer; import com.stripe.model.Customer;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import oneit.appservices.config.ConfigMgr; import oneit.appservices.config.ConfigMgr;
import oneit.business.content.Article; import oneit.business.content.Article;
...@@ -110,6 +112,7 @@ public class SendCompanyUserInvitesFP extends SaveFP ...@@ -110,6 +112,7 @@ public class SendCompanyUserInvitesFP extends SaveFP
{ {
companyUser.setRole(RoleType.ADMIN); companyUser.setRole(RoleType.ADMIN);
companyUser.setRoleTypes(RoleType.OWNER, RoleType.BILLING);
// Create customer in Stripe and subscribe for plan 0001 and coupon EAP. Only for 0.0.4.1 release // Create customer in Stripe and subscribe for plan 0001 and coupon EAP. Only for 0.0.4.1 release
// Need to handle properly when plan and billing screens are added // Need to handle properly when plan and billing screens are added
......
...@@ -45,6 +45,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -45,6 +45,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
public static final String FIELD_ForgotPasswordMailSendDate = "ForgotPasswordMailSendDate"; public static final String FIELD_ForgotPasswordMailSendDate = "ForgotPasswordMailSendDate";
public static final String FIELD_ForgotPasswordKey = "ForgotPasswordKey"; public static final String FIELD_ForgotPasswordKey = "ForgotPasswordKey";
public static final String FIELD_Role = "Role"; public static final String FIELD_Role = "Role";
public static final String FIELD_Roles = "Roles";
public static final String FIELD_Phone = "Phone"; public static final String FIELD_Phone = "Phone";
public static final String FIELD_VerificationMailSendDate = "VerificationMailSendDate"; public static final String FIELD_VerificationMailSendDate = "VerificationMailSendDate";
public static final String FIELD_VerificationKey = "VerificationKey"; public static final String FIELD_VerificationKey = "VerificationKey";
...@@ -68,6 +69,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -68,6 +69,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<CompanyUser> HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<CompanyUser, RoleType> HELPER_Role = new EnumeratedAttributeHelper<CompanyUser, RoleType> (RoleType.FACTORY_RoleType); private static final EnumeratedAttributeHelper<CompanyUser, RoleType> HELPER_Role = new EnumeratedAttributeHelper<CompanyUser, RoleType> (RoleType.FACTORY_RoleType);
private static final DelimitedEnumsAttributeHelper HELPER_Roles = new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType);
private static final DefaultAttributeHelper<CompanyUser> HELPER_Phone = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<CompanyUser> HELPER_Phone = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<CompanyUser> HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
...@@ -84,6 +86,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -84,6 +86,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private Date _ForgotPasswordMailSendDate; private Date _ForgotPasswordMailSendDate;
private String _ForgotPasswordKey; private String _ForgotPasswordKey;
private RoleType _Role; private RoleType _Role;
private Set<RoleType> _Roles;
private String _Phone; private String _Phone;
private Date _VerificationMailSendDate; private Date _VerificationMailSendDate;
private String _VerificationKey; private String _VerificationKey;
...@@ -113,6 +116,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -113,6 +116,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
private static final AttributeValidator[] FIELD_ForgotPasswordMailSendDate_Validators; private static final AttributeValidator[] FIELD_ForgotPasswordMailSendDate_Validators;
private static final AttributeValidator[] FIELD_ForgotPasswordKey_Validators; private static final AttributeValidator[] FIELD_ForgotPasswordKey_Validators;
private static final AttributeValidator[] FIELD_Role_Validators; private static final AttributeValidator[] FIELD_Role_Validators;
private static final AttributeValidator[] FIELD_Roles_Validators;
private static final AttributeValidator[] FIELD_Phone_Validators; private static final AttributeValidator[] FIELD_Phone_Validators;
private static final AttributeValidator[] FIELD_VerificationMailSendDate_Validators; private static final AttributeValidator[] FIELD_VerificationMailSendDate_Validators;
private static final AttributeValidator[] FIELD_VerificationKey_Validators; private static final AttributeValidator[] FIELD_VerificationKey_Validators;
...@@ -141,6 +145,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -141,6 +145,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
FIELD_ForgotPasswordMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordMailSendDate(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ForgotPasswordMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_ForgotPasswordKey_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordKey(validatorMapping).toArray (new AttributeValidator[0]); FIELD_ForgotPasswordKey_Validators = (AttributeValidator[])setupAttribMetaData_ForgotPasswordKey(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Role_Validators = (AttributeValidator[])setupAttribMetaData_Role(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Role_Validators = (AttributeValidator[])setupAttribMetaData_Role(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Roles_Validators = (AttributeValidator[])setupAttribMetaData_Roles(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_Phone_Validators = (AttributeValidator[])setupAttribMetaData_Phone(validatorMapping).toArray (new AttributeValidator[0]); FIELD_Phone_Validators = (AttributeValidator[])setupAttribMetaData_Phone(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]); FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationKey_Validators = (AttributeValidator[])setupAttribMetaData_VerificationKey(validatorMapping).toArray (new AttributeValidator[0]); FIELD_VerificationKey_Validators = (AttributeValidator[])setupAttribMetaData_VerificationKey(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -287,6 +292,27 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -287,6 +292,27 @@ public abstract class BaseCompanyUser extends SecUserExtension
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_Roles(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "DelimitedEnumsAttributeHelper");
metaInfo.put ("attribHelperInstance", "new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType)");
metaInfo.put ("dbcol", "roles");
metaInfo.put ("mandatory", "false");
metaInfo.put ("name", "Roles");
metaInfo.put ("type", "Set<RoleType>");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for CompanyUser.Roles:", metaInfo);
ATTRIBUTES_METADATA_CompanyUser.put (FIELD_Roles, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(CompanyUser.class, "Roles", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for CompanyUser.Roles:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_Phone(Map validatorMapping) private static List setupAttribMetaData_Phone(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -449,6 +475,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -449,6 +475,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (_ForgotPasswordMailSendDate)); _ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (_ForgotPasswordMailSendDate));
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (_ForgotPasswordKey)); _ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (_ForgotPasswordKey));
_Role = (RoleType)(HELPER_Role.initialise (_Role)); _Role = (RoleType)(HELPER_Role.initialise (_Role));
_Roles = (Set<RoleType>)(HELPER_Roles.initialise (_Roles));
_Phone = (String)(HELPER_Phone.initialise (_Phone)); _Phone = (String)(HELPER_Phone.initialise (_Phone));
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (_VerificationMailSendDate)); _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (_VerificationMailSendDate));
_VerificationKey = (String)(HELPER_VerificationKey.initialise (_VerificationKey)); _VerificationKey = (String)(HELPER_VerificationKey.initialise (_VerificationKey));
...@@ -780,6 +807,104 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -780,6 +807,104 @@ public abstract class BaseCompanyUser extends SecUserExtension
} }
/** /**
* Get the attribute Roles
*/
public Set<RoleType> getRoles ()
{
assertValid();
Set<RoleType> valToReturn = _Roles;
for (CompanyUserBehaviourDecorator bhd : CompanyUser_BehaviourDecorators)
{
valToReturn = bhd.getRoles ((CompanyUser)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preRolesChange (Set<RoleType> newRoles) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postRolesChange () throws FieldException
{
}
public FieldWriteability getWriteability_Roles ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute Roles. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setRoles (Set<RoleType> newRoles) throws FieldException
{
boolean oldAndNewIdentical = HELPER_Roles.compare (_Roles, newRoles);
try
{
for (CompanyUserBehaviourDecorator bhd : CompanyUser_BehaviourDecorators)
{
newRoles = bhd.setRoles ((CompanyUser)this, newRoles);
oldAndNewIdentical = HELPER_Roles.compare (_Roles, newRoles);
}
if (FIELD_Roles_Validators.length > 0)
{
Object newRolesObj = HELPER_Roles.toObject (newRoles);
if (newRolesObj != null)
{
int loopMax = FIELD_Roles_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_CompanyUser.get (FIELD_Roles);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_Roles_Validators[v].checkAttribute (this, FIELD_Roles, metadata, newRolesObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_Roles () != FieldWriteability.FALSE, "Field Roles is not writeable");
preRolesChange (newRoles);
markFieldChange (FIELD_Roles);
_Roles = newRoles;
postFieldChange (FIELD_Roles);
postRolesChange ();
}
}
/**
* Get the attribute Phone * Get the attribute Phone
*/ */
public String getPhone () public String getPhone ()
...@@ -2161,6 +2286,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2161,6 +2286,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject (_ForgotPasswordMailSendDate)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject (_ForgotPasswordMailSendDate)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject (_ForgotPasswordKey)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject (_ForgotPasswordKey)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Role, HELPER_Role.toObject (_Role)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_Role, HELPER_Role.toObject (_Role)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Roles, HELPER_Roles.toObject (_Roles)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_Phone, HELPER_Phone.toObject (_Phone)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_Phone, HELPER_Phone.toObject (_Phone)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject (_VerificationMailSendDate)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject (_VerificationMailSendDate)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationKey, HELPER_VerificationKey.toObject (_VerificationKey)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationKey, HELPER_VerificationKey.toObject (_VerificationKey)); //
...@@ -2186,6 +2312,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2186,6 +2312,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.fromObject (_ForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordMailSendDate))); // _ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.fromObject (_ForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordMailSendDate))); //
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.fromObject (_ForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordKey))); // _ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.fromObject (_ForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_ForgotPasswordKey))); //
_Role = (RoleType)(HELPER_Role.fromObject (_Role, oneit_sec_user_extensionPSet.getAttrib (FIELD_Role))); // _Role = (RoleType)(HELPER_Role.fromObject (_Role, oneit_sec_user_extensionPSet.getAttrib (FIELD_Role))); //
_Roles = (Set<RoleType>)(HELPER_Roles.fromObject (_Roles, oneit_sec_user_extensionPSet.getAttrib (FIELD_Roles))); //
_Phone = (String)(HELPER_Phone.fromObject (_Phone, oneit_sec_user_extensionPSet.getAttrib (FIELD_Phone))); // _Phone = (String)(HELPER_Phone.fromObject (_Phone, oneit_sec_user_extensionPSet.getAttrib (FIELD_Phone))); //
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.fromObject (_VerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationMailSendDate))); // _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.fromObject (_VerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.fromObject (_VerificationKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationKey))); // _VerificationKey = (String)(HELPER_VerificationKey.fromObject (_VerificationKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationKey))); //
...@@ -2238,6 +2365,15 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2238,6 +2365,15 @@ public abstract class BaseCompanyUser extends SecUserExtension
try try
{ {
setRoles (otherCompanyUser.getRoles ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setPhone (otherCompanyUser.getPhone ()); setPhone (otherCompanyUser.getPhone ());
} }
catch (FieldException ex) catch (FieldException ex)
...@@ -2317,6 +2453,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2317,6 +2453,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = sourceCompanyUser._ForgotPasswordMailSendDate; _ForgotPasswordMailSendDate = sourceCompanyUser._ForgotPasswordMailSendDate;
_ForgotPasswordKey = sourceCompanyUser._ForgotPasswordKey; _ForgotPasswordKey = sourceCompanyUser._ForgotPasswordKey;
_Role = sourceCompanyUser._Role; _Role = sourceCompanyUser._Role;
_Roles = sourceCompanyUser._Roles;
_Phone = sourceCompanyUser._Phone; _Phone = sourceCompanyUser._Phone;
_VerificationMailSendDate = sourceCompanyUser._VerificationMailSendDate; _VerificationMailSendDate = sourceCompanyUser._VerificationMailSendDate;
_VerificationKey = sourceCompanyUser._VerificationKey; _VerificationKey = sourceCompanyUser._VerificationKey;
...@@ -2383,6 +2520,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2383,6 +2520,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
_ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.readExternal (_ForgotPasswordMailSendDate, vals.get(FIELD_ForgotPasswordMailSendDate))); // _ForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.readExternal (_ForgotPasswordMailSendDate, vals.get(FIELD_ForgotPasswordMailSendDate))); //
_ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.readExternal (_ForgotPasswordKey, vals.get(FIELD_ForgotPasswordKey))); // _ForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.readExternal (_ForgotPasswordKey, vals.get(FIELD_ForgotPasswordKey))); //
_Role = (RoleType)(HELPER_Role.readExternal (_Role, vals.get(FIELD_Role))); // _Role = (RoleType)(HELPER_Role.readExternal (_Role, vals.get(FIELD_Role))); //
_Roles = (Set<RoleType>)(HELPER_Roles.readExternal (_Roles, vals.get(FIELD_Roles))); //
_Phone = (String)(HELPER_Phone.readExternal (_Phone, vals.get(FIELD_Phone))); // _Phone = (String)(HELPER_Phone.readExternal (_Phone, vals.get(FIELD_Phone))); //
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.readExternal (_VerificationMailSendDate, vals.get(FIELD_VerificationMailSendDate))); // _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.readExternal (_VerificationMailSendDate, vals.get(FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.readExternal (_VerificationKey, vals.get(FIELD_VerificationKey))); // _VerificationKey = (String)(HELPER_VerificationKey.readExternal (_VerificationKey, vals.get(FIELD_VerificationKey))); //
...@@ -2408,6 +2546,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2408,6 +2546,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
vals.put (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.writeExternal (_ForgotPasswordMailSendDate)); vals.put (FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.writeExternal (_ForgotPasswordMailSendDate));
vals.put (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.writeExternal (_ForgotPasswordKey)); vals.put (FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.writeExternal (_ForgotPasswordKey));
vals.put (FIELD_Role, HELPER_Role.writeExternal (_Role)); vals.put (FIELD_Role, HELPER_Role.writeExternal (_Role));
vals.put (FIELD_Roles, HELPER_Roles.writeExternal (_Roles));
vals.put (FIELD_Phone, HELPER_Phone.writeExternal (_Phone)); vals.put (FIELD_Phone, HELPER_Phone.writeExternal (_Phone));
vals.put (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.writeExternal (_VerificationMailSendDate)); vals.put (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.writeExternal (_VerificationMailSendDate));
vals.put (FIELD_VerificationKey, HELPER_VerificationKey.writeExternal (_VerificationKey)); vals.put (FIELD_VerificationKey, HELPER_VerificationKey.writeExternal (_VerificationKey));
...@@ -2444,6 +2583,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2444,6 +2583,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
listener.notifyFieldChange(this, other, FIELD_Role, HELPER_Role.toObject(this._Role), HELPER_Role.toObject(otherCompanyUser._Role)); listener.notifyFieldChange(this, other, FIELD_Role, HELPER_Role.toObject(this._Role), HELPER_Role.toObject(otherCompanyUser._Role));
} }
if (!HELPER_Roles.compare(this._Roles, otherCompanyUser._Roles))
{
listener.notifyFieldChange(this, other, FIELD_Roles, HELPER_Roles.toObject(this._Roles), HELPER_Roles.toObject(otherCompanyUser._Roles));
}
if (!HELPER_Phone.compare(this._Phone, otherCompanyUser._Phone)) if (!HELPER_Phone.compare(this._Phone, otherCompanyUser._Phone))
{ {
listener.notifyFieldChange(this, other, FIELD_Phone, HELPER_Phone.toObject(this._Phone), HELPER_Phone.toObject(otherCompanyUser._Phone)); listener.notifyFieldChange(this, other, FIELD_Phone, HELPER_Phone.toObject(this._Phone), HELPER_Phone.toObject(otherCompanyUser._Phone));
...@@ -2501,6 +2644,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2501,6 +2644,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
visitor.visitField(this, FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject(getForgotPasswordMailSendDate())); visitor.visitField(this, FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.toObject(getForgotPasswordMailSendDate()));
visitor.visitField(this, FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject(getForgotPasswordKey())); visitor.visitField(this, FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.toObject(getForgotPasswordKey()));
visitor.visitField(this, FIELD_Role, HELPER_Role.toObject(getRole())); visitor.visitField(this, FIELD_Role, HELPER_Role.toObject(getRole()));
visitor.visitField(this, FIELD_Roles, HELPER_Roles.toObject(getRoles()));
visitor.visitField(this, FIELD_Phone, HELPER_Phone.toObject(getPhone())); visitor.visitField(this, FIELD_Phone, HELPER_Phone.toObject(getPhone()));
visitor.visitField(this, FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject(getVerificationMailSendDate())); visitor.visitField(this, FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject(getVerificationMailSendDate()));
visitor.visitField(this, FIELD_VerificationKey, HELPER_VerificationKey.toObject(getVerificationKey())); visitor.visitField(this, FIELD_VerificationKey, HELPER_VerificationKey.toObject(getVerificationKey()));
...@@ -2558,6 +2702,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2558,6 +2702,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
return filter.matches (getRole ()); return filter.matches (getRole ());
} }
else if (attribName.equals (FIELD_Roles))
{
return filter.matches (getRoles ());
}
else if (attribName.equals (FIELD_Phone)) else if (attribName.equals (FIELD_Phone))
{ {
return filter.matches (getPhone ()); return filter.matches (getPhone ());
...@@ -2639,6 +2787,12 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2639,6 +2787,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this; return this;
} }
public SearchAll andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchAll andPhone (QueryFilter<String> filter) public SearchAll andPhone (QueryFilter<String> filter)
{ {
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone"); filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
...@@ -2768,6 +2922,12 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2768,6 +2922,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this; return this;
} }
public SearchAllCompanyUsers andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchAllCompanyUsers andPhone (QueryFilter<String> filter) public SearchAllCompanyUsers andPhone (QueryFilter<String> filter)
{ {
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone"); filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
...@@ -2904,6 +3064,12 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -2904,6 +3064,12 @@ public abstract class BaseCompanyUser extends SecUserExtension
return this; return this;
} }
public SearchIdPin andRoles (QueryFilter<Set<RoleType>> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.roles", "Roles");
return this;
}
public SearchIdPin andPhone (QueryFilter<String> filter) public SearchIdPin andPhone (QueryFilter<String> filter)
{ {
filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone"); filter.addFilter (context, "oneit_sec_user_extension.phone", "Phone");
...@@ -3005,6 +3171,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3005,6 +3171,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
return HELPER_Role.toObject (getRole ()); return HELPER_Role.toObject (getRole ());
} }
else if (attribName.equals (FIELD_Roles))
{
return HELPER_Roles.toObject (getRoles ());
}
else if (attribName.equals (FIELD_Phone)) else if (attribName.equals (FIELD_Phone))
{ {
return HELPER_Phone.toObject (getPhone ()); return HELPER_Phone.toObject (getPhone ());
...@@ -3070,6 +3240,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3070,6 +3240,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
return HELPER_Role; return HELPER_Role;
} }
else if (attribName.equals (FIELD_Roles))
{
return HELPER_Roles;
}
else if (attribName.equals (FIELD_Phone)) else if (attribName.equals (FIELD_Phone))
{ {
return HELPER_Phone; return HELPER_Phone;
...@@ -3135,6 +3309,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3135,6 +3309,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
setRole ((RoleType)(HELPER_Role.fromObject (_Role, attribValue))); setRole ((RoleType)(HELPER_Role.fromObject (_Role, attribValue)));
} }
else if (attribName.equals (FIELD_Roles))
{
setRoles ((Set<RoleType>)(HELPER_Roles.fromObject (_Roles, attribValue)));
}
else if (attribName.equals (FIELD_Phone)) else if (attribName.equals (FIELD_Phone))
{ {
setPhone ((String)(HELPER_Phone.fromObject (_Phone, attribValue))); setPhone ((String)(HELPER_Phone.fromObject (_Phone, attribValue)));
...@@ -3207,6 +3385,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3207,6 +3385,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
return getWriteability_Role (); return getWriteability_Role ();
} }
else if (fieldName.equals (FIELD_Roles))
{
return getWriteability_Roles ();
}
else if (fieldName.equals (FIELD_Phone)) else if (fieldName.equals (FIELD_Phone))
{ {
return getWriteability_Phone (); return getWriteability_Phone ();
...@@ -3276,6 +3458,11 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3276,6 +3458,11 @@ public abstract class BaseCompanyUser extends SecUserExtension
fields.add (FIELD_Role); fields.add (FIELD_Role);
} }
if (getWriteability_Roles () != FieldWriteability.TRUE)
{
fields.add (FIELD_Roles);
}
if (getWriteability_Phone () != FieldWriteability.TRUE) if (getWriteability_Phone () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_Phone); fields.add (FIELD_Phone);
...@@ -3338,6 +3525,7 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3338,6 +3525,7 @@ public abstract class BaseCompanyUser extends SecUserExtension
result.add(HELPER_ForgotPasswordMailSendDate.getAttribObject (getClass (), _ForgotPasswordMailSendDate, false, FIELD_ForgotPasswordMailSendDate)); result.add(HELPER_ForgotPasswordMailSendDate.getAttribObject (getClass (), _ForgotPasswordMailSendDate, false, FIELD_ForgotPasswordMailSendDate));
result.add(HELPER_ForgotPasswordKey.getAttribObject (getClass (), _ForgotPasswordKey, false, FIELD_ForgotPasswordKey)); result.add(HELPER_ForgotPasswordKey.getAttribObject (getClass (), _ForgotPasswordKey, false, FIELD_ForgotPasswordKey));
result.add(HELPER_Role.getAttribObject (getClass (), _Role, false, FIELD_Role)); result.add(HELPER_Role.getAttribObject (getClass (), _Role, false, FIELD_Role));
result.add(HELPER_Roles.getAttribObject (getClass (), _Roles, false, FIELD_Roles));
result.add(HELPER_Phone.getAttribObject (getClass (), _Phone, false, FIELD_Phone)); result.add(HELPER_Phone.getAttribObject (getClass (), _Phone, false, FIELD_Phone));
result.add(HELPER_VerificationMailSendDate.getAttribObject (getClass (), _VerificationMailSendDate, false, FIELD_VerificationMailSendDate)); result.add(HELPER_VerificationMailSendDate.getAttribObject (getClass (), _VerificationMailSendDate, false, FIELD_VerificationMailSendDate));
result.add(HELPER_VerificationKey.getAttribObject (getClass (), _VerificationKey, false, FIELD_VerificationKey)); result.add(HELPER_VerificationKey.getAttribObject (getClass (), _VerificationKey, false, FIELD_VerificationKey));
...@@ -3453,6 +3641,24 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3453,6 +3641,24 @@ public abstract class BaseCompanyUser extends SecUserExtension
} }
/** /**
* Get the attribute Roles
*/
public Set<RoleType> getRoles (CompanyUser obj, Set<RoleType> original)
{
return original;
}
/**
* Change the value set for attribute Roles.
* May modify the field beforehand
* Occurs before validation.
*/
public Set<RoleType> setRoles (CompanyUser obj, Set<RoleType> newRoles) throws FieldException
{
return newRoles;
}
/**
* Get the attribute Phone * Get the attribute Phone
*/ */
public String getPhone (CompanyUser obj, String original) public String getPhone (CompanyUser obj, String original)
...@@ -3708,6 +3914,10 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3708,6 +3914,10 @@ public abstract class BaseCompanyUser extends SecUserExtension
{ {
return toRole (); return toRole ();
} }
if (name.equals ("Roles"))
{
return toRoles ();
}
if (name.equals ("Phone")) if (name.equals ("Phone"))
{ {
return toPhone (); return toPhone ();
...@@ -3758,6 +3968,8 @@ public abstract class BaseCompanyUser extends SecUserExtension ...@@ -3758,6 +3968,8 @@ public abstract class BaseCompanyUser extends SecUserExtension
public PipeLine<From, RoleType> toRole () { return pipe(new ORMAttributePipe<Me, RoleType>(FIELD_Role)); } public PipeLine<From, RoleType> toRole () { return pipe(new ORMAttributePipe<Me, RoleType>(FIELD_Role)); }
public PipeLine<From, Set<RoleType>> toRoles () { return pipe(new ORMAttributePipe<Me, Set<RoleType>>(FIELD_Roles)); }
public PipeLine<From, String> toPhone () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Phone)); } public PipeLine<From, String> toPhone () { return pipe(new ORMAttributePipe<Me, String>(FIELD_Phone)); }
public PipeLine<From, Date> toVerificationMailSendDate () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_VerificationMailSendDate)); } public PipeLine<From, Date> toVerificationMailSendDate () { return pipe(new ORMAttributePipe<Me, Date>(FIELD_VerificationMailSendDate)); }
......
package performa.orm; package performa.orm;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel; import oneit.logging.LogLevel;
import oneit.logging.LogMgr; import oneit.logging.LogMgr;
...@@ -66,6 +69,9 @@ public class CompanyUser extends BaseCompanyUser ...@@ -66,6 +69,9 @@ public class CompanyUser extends BaseCompanyUser
} }
secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_ADMIN, getTransaction())); secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_ADMIN, getTransaction()));
setRoleTypes(RoleType.ADMIN);
removeRoleTypes(RoleType.STANDARD);
} }
else if(getRole()==RoleType.STANDARD) else if(getRole()==RoleType.STANDARD)
{ {
...@@ -75,12 +81,38 @@ public class CompanyUser extends BaseCompanyUser ...@@ -75,12 +81,38 @@ public class CompanyUser extends BaseCompanyUser
} }
secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_USER, getTransaction())); secUser.addRole(Utils.getRole(Utils.ROLE_COMPANY_USER, getTransaction()));
setRoleTypes(RoleType.STANDARD);
removeRoleTypes(RoleType.ADMIN);
} }
super.postRoleChange(); super.postRoleChange();
} }
public void setRoleTypes(RoleType... roleType) throws FieldException
{
Set<RoleType> roles = getRoles() != null ? getRoles() : new HashSet();
roles.addAll(Arrays.asList(roleType));
setRoles(roles);
}
public void removeRoleTypes(RoleType... roleType) throws FieldException
{
Set<RoleType> roles = getRoles();
if(roles != null)
{
roles.removeAll(Arrays.asList(roleType));
setRoles(roles);
}
}
@Override @Override
public FieldWriteability getWriteability_Role() public FieldWriteability getWriteability_Role()
{ {
......
...@@ -13,16 +13,17 @@ ...@@ -13,16 +13,17 @@
<TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE"> <TABLE name="oneit_sec_user_extension" tablePrefix="object" polymorphic="TRUE">
<ATTRIB name="ForgotPasswordMailSendDate" type="Date" dbcol="forgot_password_mail_send_date" /> <ATTRIB name="ForgotPasswordMailSendDate" type="Date" dbcol="forgot_password_mail_send_date" />
<ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/> <ATTRIB name="ForgotPasswordKey" type="String" dbcol="forgot_password_key" length="10"/>
<ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/> <ATTRIB name="Role" type="RoleType" dbcol="role_type" mandatory="false" attribHelper="EnumeratedAttributeHelper"/>
<ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" /> <ATTRIB name="Roles" type="Set&lt;RoleType&gt;" dbcol="roles" mandatory="false" attribHelper="DelimitedEnumsAttributeHelper" attribHelperInstance="new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType)"/>
<ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" /> <ATTRIB name="Phone" type="String" dbcol="phone" mandatory="false" length="30" />
<ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/> <ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" />
<ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/> <ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/>
<ATTRIB name="IsEmailChanged" type="Boolean" dbcol="is_email_changed" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="StripeReference" type="String" dbcol="stripe_reference" length="100"/> <ATTRIB name="IsEmailChanged" type="Boolean" dbcol="is_email_changed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="StripeSubscription" type="String" dbcol="stripe_subscription" length="100"/> <ATTRIB name="StripeReference" type="String" dbcol="stripe_reference" length="100"/>
<ATTRIB name="StripeSubscription" type="String" dbcol="stripe_subscription" length="100"/>
<SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" backreferenceName="Extensions" inSuper='TRUE'/> <SINGLEREFERENCE name="User" type="SecUser" dbcol="user_id" backreferenceName="Extensions" inSuper='TRUE'/>
<SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" backreferenceName="Users"/> <SINGLEREFERENCE name="Company" type="Company" dbcol="company_id" backreferenceName="Users"/>
......
...@@ -31,6 +31,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -31,6 +31,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
private Date dummyForgotPasswordMailSendDate; private Date dummyForgotPasswordMailSendDate;
private String dummyForgotPasswordKey; private String dummyForgotPasswordKey;
private RoleType dummyRole; private RoleType dummyRole;
private Set<RoleType> dummyRoles;
private String dummyPhone; private String dummyPhone;
private Date dummyVerificationMailSendDate; private Date dummyVerificationMailSendDate;
private String dummyVerificationKey; private String dummyVerificationKey;
...@@ -44,6 +45,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -44,6 +45,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
private static final DefaultAttributeHelper HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_ForgotPasswordMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_ForgotPasswordKey = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper HELPER_Role = new EnumeratedAttributeHelper (RoleType.FACTORY_RoleType); private static final EnumeratedAttributeHelper HELPER_Role = new EnumeratedAttributeHelper (RoleType.FACTORY_RoleType);
private static final DelimitedEnumsAttributeHelper HELPER_Roles = new DelimitedEnumsAttributeHelper (RoleType.FACTORY_RoleType);
private static final DefaultAttributeHelper HELPER_Phone = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_Phone = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
...@@ -60,6 +62,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -60,6 +62,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
dummyForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (dummyForgotPasswordMailSendDate)); dummyForgotPasswordMailSendDate = (Date)(HELPER_ForgotPasswordMailSendDate.initialise (dummyForgotPasswordMailSendDate));
dummyForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (dummyForgotPasswordKey)); dummyForgotPasswordKey = (String)(HELPER_ForgotPasswordKey.initialise (dummyForgotPasswordKey));
dummyRole = (RoleType)(HELPER_Role.initialise (dummyRole)); dummyRole = (RoleType)(HELPER_Role.initialise (dummyRole));
dummyRoles = (Set<RoleType>)(HELPER_Roles.initialise (dummyRoles));
dummyPhone = (String)(HELPER_Phone.initialise (dummyPhone)); dummyPhone = (String)(HELPER_Phone.initialise (dummyPhone));
dummyVerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (dummyVerificationMailSendDate)); dummyVerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (dummyVerificationMailSendDate));
dummyVerificationKey = (String)(HELPER_VerificationKey.initialise (dummyVerificationKey)); dummyVerificationKey = (String)(HELPER_VerificationKey.initialise (dummyVerificationKey));
...@@ -70,7 +73,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -70,7 +73,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
} }
private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.role_type, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.is_email_changed, {PREFIX}oneit_sec_user_extension.stripe_reference, {PREFIX}oneit_sec_user_extension.stripe_subscription, {PREFIX}oneit_sec_user_extension.user_id, {PREFIX}oneit_sec_user_extension.company_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.role_type, {PREFIX}oneit_sec_user_extension.roles, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.is_email_changed, {PREFIX}oneit_sec_user_extension.stripe_reference, {PREFIX}oneit_sec_user_extension.stripe_subscription, {PREFIX}oneit_sec_user_extension.user_id, {PREFIX}oneit_sec_user_extension.company_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -125,6 +128,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -125,6 +128,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordKey)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_ForgotPasswordKey)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Role)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Role)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Roles)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Phone)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_Phone)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationMailSendDate)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationMailSendDate)||
!oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationKey)|| !oneit_sec_user_extensionPSet.containsAttrib(CompanyUser.FIELD_VerificationKey)||
...@@ -232,10 +236,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -232,10 +236,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}oneit_sec_user_extension " + "UPDATE {PREFIX}oneit_sec_user_extension " +
"SET forgot_password_mail_send_date = ?, forgot_password_key = ?, role_type = ?, phone = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, is_email_changed = ?, stripe_reference = ?, stripe_subscription = ?, user_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET forgot_password_mail_send_date = ?, forgot_password_key = ?, role_type = ?, roles = ?, phone = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, is_email_changed = ?, stripe_reference = ?, stripe_subscription = ?, user_id = ? , company_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE oneit_sec_user_extension.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE oneit_sec_user_extension.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeSubscription))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Roles.getForSQL(dummyRoles, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Roles))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeSubscription))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -655,6 +659,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -655,6 +659,7 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.getFromRS(dummyForgotPasswordMailSendDate, r, "forgot_password_mail_send_date")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordMailSendDate, HELPER_ForgotPasswordMailSendDate.getFromRS(dummyForgotPasswordMailSendDate, r, "forgot_password_mail_send_date"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.getFromRS(dummyForgotPasswordKey, r, "forgot_password_key")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_ForgotPasswordKey, HELPER_ForgotPasswordKey.getFromRS(dummyForgotPasswordKey, r, "forgot_password_key"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Role, HELPER_Role.getFromRS(dummyRole, r, "role_type")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Role, HELPER_Role.getFromRS(dummyRole, r, "role_type"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Roles, HELPER_Roles.getFromRS(dummyRoles, r, "roles"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Phone, HELPER_Phone.getFromRS(dummyPhone, r, "phone")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_Phone, HELPER_Phone.getFromRS(dummyPhone, r, "phone"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.getFromRS(dummyVerificationMailSendDate, r, "verification_mail_send_date")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.getFromRS(dummyVerificationMailSendDate, r, "verification_mail_send_date"));
oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationKey, HELPER_VerificationKey.getFromRS(dummyVerificationKey, r, "verification_key")); oneit_sec_user_extensionPSet.setAttrib(CompanyUser.FIELD_VerificationKey, HELPER_VerificationKey.getFromRS(dummyVerificationKey, r, "verification_key"));
...@@ -681,10 +686,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -681,10 +686,10 @@ public class CompanyUserPersistenceMgr extends SecUserExtensionPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}oneit_sec_user_extension " + "INSERT INTO {PREFIX}oneit_sec_user_extension " +
" (forgot_password_mail_send_date, forgot_password_key, role_type, phone, verification_mail_send_date, verification_key, is_account_verified, is_email_changed, stripe_reference, stripe_subscription, user_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " + " (forgot_password_mail_send_date, forgot_password_key, role_type, roles, phone, verification_mail_send_date, verification_key, is_account_verified, is_email_changed, stripe_reference, stripe_subscription, user_id, company_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)",
CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeSubscription))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray()); CollectionUtils.listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_ForgotPasswordKey))).listEntry (HELPER_Role.getForSQL(dummyRole, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Role))).listEntry (HELPER_Roles.getForSQL(dummyRoles, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Roles))).listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_Phone))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsAccountVerified))).listEntry (HELPER_IsEmailChanged.getForSQL(dummyIsEmailChanged, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_IsEmailChanged))).listEntry (HELPER_StripeReference.getForSQL(dummyStripeReference, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeReference))).listEntry (HELPER_StripeSubscription.getForSQL(dummyStripeSubscription, oneit_sec_user_extensionPSet.getAttrib (CompanyUser.FIELD_StripeSubscription))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_User)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (CompanyUser.SINGLEREFERENCE_Company)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray());
oneit_sec_user_extensionPSet.setStatus (PersistentSetStatus.PROCESSED); oneit_sec_user_extensionPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -24,9 +24,13 @@ public class RoleType extends AbstractEnumerated ...@@ -24,9 +24,13 @@ public class RoleType extends AbstractEnumerated
public static final RoleType ADMIN = new RoleType ("ADMIN", "ADMIN", "Admin", false); public static final RoleType ADMIN = new RoleType ("ADMIN", "ADMIN", "Admin", false);
public static final RoleType STANDARD = new RoleType ("STANDARD", "STANDARD", "Standard", false); public static final RoleType STANDARD = new RoleType ("STANDARD", "STANDARD", "Standard", false);
public static final RoleType OWNER = new RoleType ("OWNER", "OWNER", "Owner", false);
public static final RoleType BILLING = new RoleType ("BILLING", "BILLING", "Billing", false);
private static final RoleType[] allRoleTypes = private static final RoleType[] allRoleTypes =
new RoleType[] { ADMIN,STANDARD}; new RoleType[] { ADMIN,STANDARD,OWNER,BILLING};
private static RoleType[] getAllRoleTypes () private static RoleType[] getAllRoleTypes ()
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
<VALUE name="ADMIN" value="ADMIN" description="Admin"/> <VALUE name="ADMIN" value="ADMIN" description="Admin"/>
<VALUE name="STANDARD" value="STANDARD" description="Standard"/> <VALUE name="STANDARD" value="STANDARD" description="Standard"/>
<VALUE name="OWNER" value="OWNER" description="Owner"/>
<VALUE name="BILLING" value="BILLING" description="Billing"/>
</CONSTANT> </CONSTANT>
......
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</div> </div>
</div> </div>
<div class="m-user-right"> <div class="m-user-right">
<oneit:ormEnum obj="<%= companyUser %>" attributeName="Role" cssClass="form-control user-role"/> <oneit:ormEnum obj="<%= companyUser %>" attributeName="Role" cssClass="form-control user-role" enums="<%= Arrays.asList(new RoleType[]{RoleType.ADMIN, RoleType.STANDARD}) %>"/>
</div> </div>
<oneit:button name="save" value="Save" cssClass="<%= "save-user" + companyUser.getID().toString() + " hidden"%>" <oneit:button name="save" value="Save" cssClass="<%= "save-user" + companyUser.getID().toString() + " hidden"%>"
requestAttribs="<%= CollectionUtils.mapEntry("CompanyUser", companyUser).mapEntry("nextPage", usersPage + "&UserSortOption=" + userSortOpt).toMap() %>" /> requestAttribs="<%= CollectionUtils.mapEntry("CompanyUser", companyUser).mapEntry("nextPage", usersPage + "&UserSortOption=" + userSortOpt).toMap() %>" />
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">oneit_sec_user_extension</tableName>
<column name="roles" type="String" nullable="true" length="200"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment