Attached Files | issueProcessDefinition.diff [^] (24,357 bytes) 2016-06-27 09:51 [Show Content] [Hide Content]diff --git a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
@@ -478,6 +478,8 @@
// Product Services
globalResources.add(createStaticResource("web/js/productServices.js", true));
+ globalResources.add(createStaticResource("web/js/recreateAuthKey.js", true));
+
return globalResources;
}
diff --git a/src-db/database/model/tables/AD_CLIENT.xml b/src-db/database/model/tables/AD_CLIENT.xml
--- a/src-db/database/model/tables/AD_CLIENT.xml
+++ b/src-db/database/model/tables/AD_CLIENT.xml
@@ -197,6 +197,14 @@
<default><![CDATA[0]]></default>
<onCreateDefault/>
</column>
+ <column name="RESETAUTHKEY" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+ <default/>
+ <onCreateDefault/>
+ </column>
+ <column name="AUTH_KEY" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+ <default/>
+ <onCreateDefault/>
+ </column>
<foreign-key foreignTable="AD_CLIENT" name="AD_CLIENT_AD_CLIENT">
<reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
</foreign-key>
diff --git a/src-db/database/sourcedata/AD_COLUMN.xml b/src-db/database/sourcedata/AD_COLUMN.xml
--- a/src-db/database/sourcedata/AD_COLUMN.xml
+++ b/src-db/database/sourcedata/AD_COLUMN.xml
@@ -244878,7 +244878,7 @@
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <POSITION><![CDATA[51]]></POSITION>
+<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <POSITION><![CDATA[49]]></POSITION>
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
<!--06EF3D56611445C4BAC1A2ACE23AD94A--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -351599,6 +351599,45 @@
<!--C4D9F60EEA9F4680990979357FF43A8F--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
<!--C4D9F60EEA9F4680990979357FF43A8F--></AD_COLUMN>
+<!--C4E56F2B03F14E478668FAB869D50DED--><AD_COLUMN>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_COLUMN_ID><![CDATA[C4E56F2B03F14E478668FAB869D50DED]]></AD_COLUMN_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <NAME><![CDATA[EM_Obstsyn_Resetauthkey]]></NAME>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <DESCRIPTION><![CDATA[Proces to recreate the mobile server authentication key]]></DESCRIPTION>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <HELP><![CDATA[Proces to recreate the mobile server authentication key]]></HELP>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <COLUMNNAME><![CDATA[Resetauthkey]]></COLUMNNAME>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_TABLE_ID><![CDATA[112]]></AD_TABLE_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISKEY><![CDATA[N]]></ISKEY>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <SEQNO><![CDATA[331]]></SEQNO>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_ELEMENT_ID><![CDATA[FE6292D767794D4E92003169C1C60106]]></AD_ELEMENT_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <POSITION><![CDATA[51]]></POSITION>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
+<!--C4E56F2B03F14E478668FAB869D50DED--> <EM_OBUIAPP_PROCESS_ID><![CDATA[52092F25FF6C40C78AB3103F8DF5BDA6]]></EM_OBUIAPP_PROCESS_ID>
+<!--C4E56F2B03F14E478668FAB869D50DED--></AD_COLUMN>
+
<!--C4EBD68726074887B5FFC0D344FA5CC4--><AD_COLUMN>
<!--C4EBD68726074887B5FFC0D344FA5CC4--> <AD_COLUMN_ID><![CDATA[C4EBD68726074887B5FFC0D344FA5CC4]]></AD_COLUMN_ID>
<!--C4EBD68726074887B5FFC0D344FA5CC4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -359550,6 +359589,42 @@
<!--D1237164C5EC4B7C80DCA5E9ED525724--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
<!--D1237164C5EC4B7C80DCA5E9ED525724--></AD_COLUMN>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--><AD_COLUMN>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_COLUMN_ID><![CDATA[D133C9CD1039410B9E11B3AAEEFBBCA2]]></AD_COLUMN_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <NAME><![CDATA[Auth_Key]]></NAME>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <COLUMNNAME><![CDATA[Auth_Key]]></COLUMNNAME>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_TABLE_ID><![CDATA[112]]></AD_TABLE_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISKEY><![CDATA[N]]></ISKEY>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <SEQNO><![CDATA[311]]></SEQNO>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_ELEMENT_ID><![CDATA[B2A700B9E9414B6CAF8EE12686B25D64]]></AD_ELEMENT_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <POSITION><![CDATA[50]]></POSITION>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
+<!--D133C9CD1039410B9E11B3AAEEFBBCA2--></AD_COLUMN>
+
<!--D160BFBF2CD74DAEB9FF7C425874E282--><AD_COLUMN>
<!--D160BFBF2CD74DAEB9FF7C425874E282--> <AD_COLUMN_ID><![CDATA[D160BFBF2CD74DAEB9FF7C425874E282]]></AD_COLUMN_ID>
<!--D160BFBF2CD74DAEB9FF7C425874E282--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff --git a/src-db/database/sourcedata/AD_ELEMENT.xml b/src-db/database/sourcedata/AD_ELEMENT.xml
--- a/src-db/database/sourcedata/AD_ELEMENT.xml
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml
@@ -31184,6 +31184,18 @@
<!--B27C7AF72FEFEC33E040007F0100076A--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
<!--B27C7AF72FEFEC33E040007F0100076A--></AD_ELEMENT>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--><AD_ELEMENT>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <AD_ELEMENT_ID><![CDATA[B2A700B9E9414B6CAF8EE12686B25D64]]></AD_ELEMENT_ID>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <COLUMNNAME><![CDATA[Auth_Key]]></COLUMNNAME>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <NAME><![CDATA[Authentication Key]]></NAME>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <PRINTNAME><![CDATA[Authentication Key]]></PRINTNAME>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--B2A700B9E9414B6CAF8EE12686B25D64--></AD_ELEMENT>
+
<!--B309CE97F1774C62AE6043A57DD9BAF5--><AD_ELEMENT>
<!--B309CE97F1774C62AE6043A57DD9BAF5--> <AD_ELEMENT_ID><![CDATA[B309CE97F1774C62AE6043A57DD9BAF5]]></AD_ELEMENT_ID>
<!--B309CE97F1774C62AE6043A57DD9BAF5--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -34654,6 +34666,20 @@
<!--FD78212D185842D08F38453B39BCA2F5--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
<!--FD78212D185842D08F38453B39BCA2F5--></AD_ELEMENT>
+<!--FE6292D767794D4E92003169C1C60106--><AD_ELEMENT>
+<!--FE6292D767794D4E92003169C1C60106--> <AD_ELEMENT_ID><![CDATA[FE6292D767794D4E92003169C1C60106]]></AD_ELEMENT_ID>
+<!--FE6292D767794D4E92003169C1C60106--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FE6292D767794D4E92003169C1C60106--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FE6292D767794D4E92003169C1C60106--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FE6292D767794D4E92003169C1C60106--> <COLUMNNAME><![CDATA[Resetauthkey]]></COLUMNNAME>
+<!--FE6292D767794D4E92003169C1C60106--> <NAME><![CDATA[Recreate Mobile Server Authentication Key]]></NAME>
+<!--FE6292D767794D4E92003169C1C60106--> <PRINTNAME><![CDATA[Recreate Mobile Server Authentication Key]]></PRINTNAME>
+<!--FE6292D767794D4E92003169C1C60106--> <DESCRIPTION><![CDATA[Proces to recreate the mobile server authentication key]]></DESCRIPTION>
+<!--FE6292D767794D4E92003169C1C60106--> <HELP><![CDATA[Proces to recreate the mobile server authentication key]]></HELP>
+<!--FE6292D767794D4E92003169C1C60106--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FE6292D767794D4E92003169C1C60106--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--FE6292D767794D4E92003169C1C60106--></AD_ELEMENT>
+
<!--FF16AAFDFE1D4557B2792C6B50B7D25C--><AD_ELEMENT>
<!--FF16AAFDFE1D4557B2792C6B50B7D25C--> <AD_ELEMENT_ID><![CDATA[FF16AAFDFE1D4557B2792C6B50B7D25C]]></AD_ELEMENT_ID>
<!--FF16AAFDFE1D4557B2792C6B50B7D25C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff --git a/src-db/database/sourcedata/AD_FIELD.xml b/src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/sourcedata/AD_FIELD.xml
+++ b/src-db/database/sourcedata/AD_FIELD.xml
@@ -213192,6 +213192,35 @@
<!--54D33E93161D4E478DEF43F78C9CE457--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
<!--54D33E93161D4E478DEF43F78C9CE457--></AD_FIELD>
+<!--54D5DC71C3EC49878E3A6FCD30735192--><AD_FIELD>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_FIELD_ID><![CDATA[54D5DC71C3EC49878E3A6FCD30735192]]></AD_FIELD_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <NAME><![CDATA[Recreate Mobile Server Authentication Key]]></NAME>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <DESCRIPTION><![CDATA[Proces to recreate the mobile server authentication key]]></DESCRIPTION>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <HELP><![CDATA[This process resets the authentication key of the client. This is a sensitive action which should be executed when none of the WebPOS clients is working. After this action all users need to relogin.
+]]></HELP>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_TAB_ID><![CDATA[145]]></AD_TAB_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_COLUMN_ID><![CDATA[C4E56F2B03F14E478668FAB869D50DED]]></AD_COLUMN_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <SEQNO><![CDATA[430]]></SEQNO>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--54D5DC71C3EC49878E3A6FCD30735192--> <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--54D5DC71C3EC49878E3A6FCD30735192--></AD_FIELD>
+
<!--54DB32FEEC9B4DED80CB488660F53506--><AD_FIELD>
<!--54DB32FEEC9B4DED80CB488660F53506--> <AD_FIELD_ID><![CDATA[54DB32FEEC9B4DED80CB488660F53506]]></AD_FIELD_ID>
<!--54DB32FEEC9B4DED80CB488660F53506--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff --git a/src-db/database/sourcedata/OBUIAPP_PROCESS.xml b/src-db/database/sourcedata/OBUIAPP_PROCESS.xml
--- a/src-db/database/sourcedata/OBUIAPP_PROCESS.xml
+++ b/src-db/database/sourcedata/OBUIAPP_PROCESS.xml
@@ -131,6 +131,26 @@
<!--4AD70293357245AB96E59C2CDB43A35D--> <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
<!--4AD70293357245AB96E59C2CDB43A35D--></OBUIAPP_PROCESS>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--><OBUIAPP_PROCESS>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <OBUIAPP_PROCESS_ID><![CDATA[52092F25FF6C40C78AB3103F8DF5BDA6]]></OBUIAPP_PROCESS_ID>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <VALUE><![CDATA[RecreateMobileServerAuthenticationKey]]></VALUE>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <NAME><![CDATA[Recreate Mobile Server Authentication Key]]></NAME>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <DESCRIPTION><![CDATA[Proces to recreate the mobile server authentication key]]></DESCRIPTION>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <HELP><![CDATA[Proces to recreate the mobile server authentication key]]></HELP>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <CLASSNAME><![CDATA[OB.RecreateAuthKey.recreate]]></CLASSNAME>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <UIPATTERN><![CDATA[M]]></UIPATTERN>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ISMULTIRECORD><![CDATA[N]]></ISMULTIRECORD>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <IS_EXPLICIT_ACCESS><![CDATA[Y]]></IS_EXPLICIT_ACCESS>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ISGRIDLEGACY><![CDATA[N]]></ISGRIDLEGACY>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--> <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
+<!--52092F25FF6C40C78AB3103F8DF5BDA6--></OBUIAPP_PROCESS>
+
<!--5D335DD61A264A6FAD881E159ADA9F5A--><OBUIAPP_PROCESS>
<!--5D335DD61A264A6FAD881E159ADA9F5A--> <OBUIAPP_PROCESS_ID><![CDATA[5D335DD61A264A6FAD881E159ADA9F5A]]></OBUIAPP_PROCESS_ID>
<!--5D335DD61A264A6FAD881E159ADA9F5A--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff --git a/src/org/openbravo/RecreateMobileServerAuthKeyHandler.java b/src/org/openbravo/RecreateMobileServerAuthKeyHandler.java
new file mode 100644
--- /dev/null
+++ b/src/org/openbravo/RecreateMobileServerAuthKeyHandler.java
@@ -0,0 +1,79 @@
+/*
+ *************************************************************************
+ * Openbravo DB Synchronization module for Retail
+ * Copyright (C) 2016 Openbravo SLU
+ *
+ * The content of this file is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ************************************************************************
+ */
+
+package org.openbravo;
+
+import java.util.Map;
+
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+
+import org.apache.commons.codec.binary.Base64;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.model.ad.system.Client;
+import org.openbravo.service.db.DalConnectionProvider;
+
+public class RecreateMobileServerAuthKeyHandler extends BaseActionHandler {
+ @Override
+ protected JSONObject execute(Map<String, Object> parameters, String data) {
+ ConnectionProvider conn = new DalConnectionProvider(false);
+ VariablesSecureApp vars = RequestContext.get().getVariablesSecureApp();
+ JSONObject response = new JSONObject();
+ try {
+ final JSONObject jsonData = new JSONObject(data);
+ final Client client = OBDal.getInstance().get(Client.class,
+ jsonData.getString("selectedRecord"));
+ // generate and store the key:
+ final int AES_KEYLENGTH = 128;
+ KeyGenerator keyGen = KeyGenerator.getInstance("AES");
+ keyGen.init(AES_KEYLENGTH);
+ final SecretKey secretKey = keyGen.generateKey();
+ final String strKey = Base64.encodeBase64String(secretKey.getEncoded());
+ client.setAuthKey(strKey);
+
+ JSONObject message = new JSONObject();
+
+ message.put("severity", "success");
+ message.put("title", "Success");
+ message.put("text", Utility.messageBD(conn, "Success", vars.getLanguage()));
+ response.put("message", message);
+
+ } catch (Exception e) {
+ JSONObject errorMessage = new JSONObject();
+ try {
+ errorMessage.put("severity", "error");
+ errorMessage.put("title", "Error");
+ errorMessage.put("text", OBMessageUtils.translateError(e.getMessage()).getMessage());
+ response.put("message", errorMessage);
+ } catch (JSONException ignore) {
+ }
+
+ }
+ return response;
+ }
+}
\ No newline at end of file
diff --git a/web/js/recreateAuthKey.js b/web/js/recreateAuthKey.js
new file mode 100644
--- /dev/null
+++ b/web/js/recreateAuthKey.js
@@ -0,0 +1,55 @@
+/*
+ *************************************************************************
+ * Openbravo DB Synchronization module for Retail
+ * Copyright (C) 2016 Openbravo SLU
+ *
+ * The content of this file is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ************************************************************************
+ */
+
+
+OB = OB || {};
+
+OB.RecreateAuthKey = {
+ execute: function (params, view) {
+ var selection = params.button.contextView.viewGrid.getSelectedRecords(),
+ callback;
+ callback = function (rpcResponse, data, rpcRequest) {
+ if (data.message.severity === 'success') {
+ view.view.messageBar.setMessage(isc.OBMessageBar.TYPE_SUCCESS, data.message.title, data.message.text);
+ } else {
+ view.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, data.message.title, data.message.text);
+ }
+ view.view.refresh();
+ };
+ OB.RemoteCallManager.call('org.openbravo.RecreateMobileServerAuthKeyHandler', {
+ action: params.action,
+ selectedRecord: selection[0].id
+ }, {}, callback);
+ },
+
+ recreate: function (params, view) {
+ var messageTxt = OB.I18N.getLabel('OBSTSYN_RecreateAuthKey');
+ isc.confirm(messageTxt, {}, function (clickedOK) {
+ if (clickedOK) {
+ var messageTxt = OB.I18N.getLabel('OBSTSYN_ConfirmRecreateAuthKey');
+ isc.confirm(messageTxt, {}, function (clickedOK) {
+ if (clickedOK) {
+ OB.RecreateAuthKey.execute(params, view);
+ }
+ });
+ }
+ });
+ }
+};
\ No newline at end of file
issue33355.diff [^] (742 bytes) 2016-06-27 09:51 [Show Content] [Hide Content]diff --git a/src/org/openbravo/dal/security/SecurityChecker.java b/src/org/openbravo/dal/security/SecurityChecker.java
--- a/src/org/openbravo/dal/security/SecurityChecker.java
+++ b/src/org/openbravo/dal/security/SecurityChecker.java
@@ -132,7 +132,7 @@
final Entity entity = ((BaseOBObject) obj).getEntity();
if ((!obContext.isInAdministratorMode() || obContext.doOrgClientAccessCheck())
&& clientId.length() > 0) {
- if (obj instanceof ClientEnabled) {
+ if (obj instanceof ClientEnabled || obj instanceof Client) {
if (!obContext.getCurrentClient().getId().equals(clientId)) {
// TODO: maybe move rollback to exception throwing
SessionHandler.getInstance().setDoRollback(true);
|