on 02-13-2008 6:35 PM
Hi everyone,
i've a urgent Problem getting UME / Java Permission Checks in a Webdynpo App.
I followed the instructions in Webdynpor UME Tutorail and created a user (System SAP Discovery Server v2, Netweaver 7.0) and assign it to a role.
The role have three actions but the User Check failed.
That's my ValuePermission Class (created in the same package as the other controllers)
*/
public class SupplierSelfServicesValuePermissions extends ValuePermission {
/**
@param arg0
@param arg1
*/
public SupplierSelfServicesValuePermissions(String name, String action) {
super(name, action);
}
}
There are no build errors
I uploaded the following UME Action File via Visual Administrator and i had no problems buiding roles and assign it to user.
<BUSINESSSERVICE NAME="P4TSSS">
<DESCRIPTION LOCALE="en" VALUE="P4T Supplier Self Services Actions" />
<!-- Detailed Business Service Actions -->
<ACTION NAME="UseWorkspace">
<DESCRIPTION LOCALE="en" VALUE="Use Personal Workspace" />
<DESCRIPTION LOCALE="de" VALUE="Persoenlicher Arbeitsbereich" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesValuePermissions"
NAME="UseWorkspace" VALUE="*" />
</ACTION>
<ACTION NAME="CreateQuotations">
<DESCRIPTION LOCALE="en" VALUE="Create Quotations" />
<DESCRIPTION LOCALE="de" VALUE="Angebote bearbeiten und speichern" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesValuePermissions"
NAME="SaveQuotation" VALUE="*" />
</ACTION>
<ACTION NAME="DisplayDashboard">
<DESCRIPTION LOCALE="en" VALUE="Display Dashboard" />
<DESCRIPTION LOCALE="de" VALUE="Uebersichtsanzeige" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesValuePermissions"
NAME="PurchaseOrg" VALUE="BP01" />
</ACTION>
</BUSINESSSERVICE>
I also checked the Role Assignment via Debugger (IRole Class). It's right. Restarted J2EE Engine several times.
But this / all checks always failed (false)
if (user.hasPermission(new SupplierSelfServicesValuePermissions("UseWorkspace","*")) == false) {
I've checked the action / role assigment serveral times. no errors.
I made a rebuild / reload and deploy it . Changes are visible via Debugger. No inconsistence.
Can anbody help me?
Thanks very much for helping me!
Best Regards
Chris
These two packages need to match:
actions.xml
PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesPermissions"
SupplierSelfServicesPermissions.java
package com.pool4tool.sss;
Edited by: Client/Web Client/Web on Feb 15, 2008 2:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for helping me but unfortunately it seems not to be the solution.
I removed all Actions from Roles
I removed the Actions.XML File via Visual Administrator
Building a new one
<BUSINESSSERVICE NAME="P4TSSS">
<DESCRIPTION LOCALE="en" VALUE="P4T Supplier Self Services Actions" />
<!-- Detailed Business Service Actions -->
<ACTION NAME="UseWorkspace">
<DESCRIPTION LOCALE="en" VALUE="Use Personal Workspace" />
<DESCRIPTION LOCALE="de" VALUE="Persoenlicher Arbeitsbereich" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesPermissions"
NAME="Workspace" VALUE="use" />
</ACTION>
<ACTION NAME="SaveQuotations">
<DESCRIPTION LOCALE="en" VALUE="Create Quotations" />
<DESCRIPTION LOCALE="de" VALUE="Angebote bearbeiten und speichern" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesPermissions"
NAME="Quotation" VALUE="save" />
</ACTION>
<ACTION NAME="DisplayDashboard">
<DESCRIPTION LOCALE="en" VALUE="Display Dashboard" />
<DESCRIPTION LOCALE="de" VALUE="Uebersichtsanzeige" />
<PERMISSION CLASS="pool4tool.com.sss.SupplierSelfServicesPermissions"
NAME="PurchaseOrg" VALUE="BP01" />
</ACTION>
</BUSINESSSERVICE>
Deploy it via Development Component (create a new one type UME Permission)
Building the new ActionPermission Class
package com.pool4tool.sss;
import com.sap.security.api.permissions.ActionPermission;
/**
@author Administrator
*
To change the template for this generated type comment go to
Window>Preferences>Java>Code Generation>Code and Comments
*/
public class SupplierSelfServicesPermissions extends ActionPermission {
/**
@param arg0
@param arg1
*/
public SupplierSelfServicesPermissions(String name, String action) {
super(name, action);
}
}
Change my Checks
IWDClientUser lr_user = WDClientUser.getCurrentUser();
if (lr_user.hasPermission(new SupplierSelfServicesPermissions("PurchaseOrg",ld_purchase_org))
...
But the checks are alwasy false.
Any other ideas?
It seems to be the typically mysterious bug - unbelievable
By the way - i use following system:
sap.com/SAP-JEECOR 7.00 SP8 (1000.7.00.8.0.20060608124100) 20060819030035
sap.com/SAP-JEE 7.00 SP8 (1000.7.00.8.0.20060608124100) 20060819030045
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should use the ActionPermission class instead of the ValuePermission class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.