cancel
Showing results for 
Search instead for 
Did you mean: 

UME Actions Check failed using ValuePermission Class

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Great - this was the solution.

Wrong packagename in the Action XML File.

A little error with big influences.

Thank you for your great help!

Answers (2)

Answers (2)

Former Member
0 Kudos

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&gt;Preferences&gt;Java&gt;Code Generation&gt;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

Former Member
0 Kudos

You should use the ActionPermission class instead of the ValuePermission class.