Check PCD object permissions

Hi,
I am trying to check the PCD object permission for the logged in user with minimal performance impact.
I am using below code. This doesn't seem to work and "hasPermissions" always returns "false". Can someone tell me the problem with below code?
IUserFactory userFactory= UMFactory.getUserFactory();
IAclManager manager = UMFactory.getAclManager();
boolean hasPermission = manager.isAllowed("pcd:portal_content/ABC/XYZ/ROLE/TESTROLE", request.getUser(), IPermission.PCM_ADMIN_READ);
I tried another approach as well. This one did return "true" (expected result) but the issue is we have to lookup the object everytime. This might cause performance issues when checking permissions for many objects.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(Context.SECURITY_PRINCIPAL, request.getUser());
env.put("com.sap.portal.jndi.requested_aspect", PcmConstants.ASPECT_ADMINISTRATION);
InitialContext iCtx = null;
try {
    String objectName = "pcd:portal_content/ABC/XYZ/ROLE/TESTROLE";
    iCtx = new InitialContext(env);
    IAdminBase myAdmin =(IAdminBase)iCtx.lookup(objectName);
    IPermission myIview = (IPermission) myAdmin.getImplementation(IAdminBase.PERMISSION);
    hasPermission = myIview.isAllowed(request.getUser(),IPermission.PCM_ADMIN_READ);
} catch (Exception e) {
    e.printStackTrace();

Hi,
If onlly certain pcd objects are locked which are used by other users parallely or if some one opened the object and not closed properly  then  you can go to the above path as suggested and unlock the objects.
If that is not the case then below threads will help you.
Re: Cannot update Pcd Configuration parameter Pcd.Xfs.Cache.HardReferenceLimit
Re: Service Configuration editor lock?
Raghu

Similar Messages

  • PCD Audit : What information about the PCD objects are stored in the PCD?

    Folks,
    Need some information on the information stored in the PCD for audit purposes.
    Object = Any PCD object, typically iView, Page, Workset, Role, Group...
    1. Creation of any object - Should definately be present in the PCD
    2. Any modification including history - List of all actions on any PCD object - I am sure the last modification is tracked, but can we track every change to the object from creation?
    3. Deletion of any object? - This I am not sure of - Does the PCD store information about deleted object's like deletion time stamp and the user who deleted etc?
    Thank you...

    Hi,
    >>1. Creation of any object - Should definately be present in the PCD
    There is no doubt about this.
    >>2. Any modification including history - List of all actions on any PCD object - I am sure the last modification is tracked, but can we track every change to the object from creation?
       <b>AND</b>
    >>3. Deletion of any object? - This I am not sure of - Does the PCD store information about deleted object's like deletion time stamp and the user who deleted etc?
    There is no versioning concept in PCD right now, but ofcourse planned for future.
    So you cannot track the history and deleted objects, but there exists PCD Repository Manager in KM on which you can activate versioning. Check if this suites your needs. Never tried but logically ever PCD change should get versioned here.
    http://help.sap.com/saphelp_nw70/helpdata/en/76/a8934259a5cc6ae10000000a155106/frameset.htm
    Greetings,
    Praveen Gudapati

  • Nwdi-managed access of pcd-objects from java web dynpro

    Hi,
    im am trying to access portal pcd-objects from a java web dynpro component (namely getting and setting personalized iview properties). for locally managed web dynpro components this works fine with the code below.
    when i try the same with a nwdi managed web dynpro component i run into problems regarding references to used dcs. for instance, i need to reference used dc SAP_JTECHS/tc/epbc/pcm/adminapi/java because the build needs tcepbcpcmadminapijava.jar which is inside the mentioned dc. but access permissions of this dc don't allow the dependency. when i try to "add used dc ..." in nwds i get the error message: illegal dependency: access list does not allow use of ...
    has someone any solution for this problem? are there other ways of accessing pcd-objects from java web dynpro (nwdi managed!)?
    thanks
    heiko
    private static void savePersonalizationData(String value) {
         try {
              IAttributeSet attributeSet = (IAttributeSet) getIview(IVIEW);
              attributeSet.putAttribute(ATTRIBUTE, value);
              attributeSet.save();
         } catch (Exception e) {
    private static Object getIview(String pcdPath) throws Exception {
         Hashtable env = new Hashtable();
         env.put(
              com.sap.portal.directory.Constants.REQUESTED_ASPECT,
              com.sap.portal.pcm.admin.PcmConstants.ASPECT_SEMANTICS);
         env.put(
              Context.SECURITY_PRINCIPAL,
              WDClientUser.getCurrentUser().getSAPUser());
         env.put(
              IPcdContext.PCD_PERSONALIZATION_PRINCIPAL,
              WDClientUser.getCurrentUser().getSAPUser());
         InitialContext iCtx = new InitialContext(env);
         return iCtx.lookup(pcdPath);

    Hi Kust,
    To access the PCD objects the code you used looks ok for me but your main issues is related to the dc access permissions. This thread discussed about the similar issue. Please review this below thread.
    /message/979328#979328 [original link is broken]
    Regards
    Krishna Reddy

  • Pcd object "com.sap.pct.crm.core.valuehelp" cannot be accessed

    Hi dear gurus,
    We need your help.
    We are a company working with CRM 5.0 Sp 15 on EP 7.0.
    We have this problem:
    One of the BP's tabs shows the Marketing Attributes in the standard way: first of all you have to decide the attribute set ("Add"), then you have to choose the attribute ("Add" in the attribute section) and at last you can choose the value for the attribute.
    This works well in dev and qas, both through the portal and through the PCUI web pages launched by a link in the sapgui.
    This also works in the production environment, but ONLY if launched through the SAP GUI's web app (without the portal's intervention)
    The problem is that, in the production environment, when we click on the value list of the attribute set IN THE PORTAL, we receive an exception of this kind:
    [EXCEPTION]
    com.sapportals.portal.prt.runtime.PortalRuntimeException: Access is denied: pcd:portal_content/com.sap.pct/specialist/com.sap.pct.crm/com.sap.pct.crm.roles/com.sap.pct.crm.core.defaultservices/com.sap.pct.crm.core.valuehelp - user: TEAMDEVEL, TEAMDEVEL
    We have re-created the role copying it from the QAS environment, we have linked a new user to it but we still have the problem.
    Is the user lacking a portal authorization in the production system? What would it be? Shouldn't it have been fixed by the recreation of the role and of the user? Any ideas?
    Thank you very much for your precious help...

    Hi Giovanni,
    It looks like a permissions issue, you might want to refer to the permissions of
    1. The role that you are creating, see to it that you have everyone group assigned to it and enduser checked.
    2. As you are connecting to CRM system, you might be have created a system using which you are accessing the CRM system, check for the permissions of that as well.
    Hope this helps.
    Cheers,
    Sandeep Tudumu

  • Creating a PCD Object(iview or page) thru API

    Hi All,
    I found some help regarding creating a PCD Object,
    This is the following code
    IiViews iViewSrv = (IiViews)
        PortalRuntime.getRuntimeResources().getService(IiViews.KEY);
    INewObjectDescriptor IVtoCreate = (INewObjectDescriptor)
        iViewSrv.instantiateDescriptor(CreateMethod.NEW,
            "par:/applications/myProject/components/myComponent",request.getUser());
    I am unable to find jar files to compile
    what are the jar files which consist of the interfaces Iiviews and IPage, IPages.And where can I find those?
    Thanks in Advance
    Rgds,
    Santhosh

    Hi Elda,
    First, thanks for a great API discovery for me (a pity I can't reward points to you).
    Do you have a link to online documentation on this?
    Second, there are 2 solutions:
    1. WinRar can search inside jars. Use it to search for the file IiViews.class on the server.
    2. Use the great classlocator plugin. See this post for details:
    How to use classlocator plugin?
    According to my last check the download link no longer works. If that's the case I can send it by e-mail.
    Hope that helps,
    Yoav.

  • Need to update Object permissions for a form in the form designer

    Hi Experts,
    I created a new form and attached to a process definiton.
    Later created a new version and changed some properties for the attributes.
    somehow I missed the object permissions for the system administrator. not even a single permission is checked out of "Allow Insert, Allow Update and Allow Delete". I tried to assign the permissions by creating a new verion. when i try to save it is saying " YOU DO NOT HAVE ENOUGH PERMISSIONS TO ADD THIS OBJECT". I tried to assign the permission for the form to the SYSTEM ADMINISTRATORS group from web console but, there also I got the same error. can anyone please help me to change the Object permissions if you have come across this problem.
    Edited by: 804064 on Oct 21, 2010 6:07 AM

    If I import the older version of the form, The permissions are back.
    the second alternate solution is
    Export the form and in the XML edit the following values
    Just change “0” to “1” for insert, update and delete.
    <DataObjPermission>
    <SEL_DELETE_ALLOW>1</SEL_DELETE_ALLOW>
    <SEL_UPDATE_ALLOW>1</SEL_UPDATE_ALLOW>
    <SEL_UPDATE>1289570464000</SEL_UPDATE>
    <SEL_INSERT_ALLOW>1</SEL_INSERT_ALLOW>
    <UGP_KEY UserGroup = "SYSTEM ADMINISTRATORS"/>
    </DataObjPermission>

  • Problem to check out object in siebel 8.1, using Windows Vista

    Hi people,
    i'm quite new to siebel and recently, i am supposed to start developing applets and BCs. The problem is, i cant check out object from the server. whenever i hit the button Check Out, the system (Siebel 8.1) is hang and stop responding. Can anyone help me on this? Thank you so much.
    Zaly#

    Hi,
    i've tried both ODBC, SSD Default instance and SSD Local Db default instance. Both yielded same result, which the connection is successful. But for SSD Default Instance, whenever i tried to hit the button 'Test Connect' for 2nd time or more, it will stop responding and hang. Only the first time is succesful.
    I really dont have the idea how the problem occurs. but it works well if i do check out in computer that runs on window XP. Is the problem comes because i'm using vista?

  • Context menu not showing up in EP ( OPEN Object,Permissions ..etc.)

    Dear Portal Gurus,
    We did some changes to the Top Level Nav. PAR file and deployed it into EP.We did it couple of times with every new change and it worked OK.Then once there was this problem with in the Code due some oversight from the developer.We deployed it ...then we were getting an error in EP the Mast Head + Top Level Nav. (all Tabs) part was missing ...was replaced by an error.
    The developer did a Remove Iview from page.
    I deployed a new PAR which was a copy of the original (untouched version of Top Level Nav. PAR) and created a new Iview based on that and used it in the framework page.....The problem was still existing it.
    So I transported the framwork page from my other EP system onto to this EP system which had problems....
    After the transport,all looked OK...no errors..things worked good.
    But after 2 days I got a scripting error wherein the page would load but there would be an error in the status bar.
    Now we were not able to expand any TREE or open any context menu ( for e.g. OPEN OBJECT,Permissions etc).
    The problem with the TREE expansion has been fixed but the context menu still has problems...
    EP 6.0,SP12.
    Any help appreciated.
    Thanks.
    Josh

    close the browser, delete the cache and retry it
    i've seen some problems with the context menu in EP, but its usually due to the browser cache

  • How to show a pcd object in dynpro view

    Hi All,
    I have to show a PCD object in dynpro view but I can't use iFrame because it will show all header footer of portal not just view.
    what will be other way to show a PCD object in Webdynpro view.
    Thanks

    Hi John,
    Yes I want to display a iView only but of other type, will you please guide me how you have achieved it?
    Thanks

  • Problems deleteting PCD-objects at level 9

    Hi
    Recently our PCD-structure have gotten deeper. Our PCD-structure starts with the folder "Portal Content" at level 1. As a result of the structure getting deeper, I am experiencing problems with deleting PCD-objects, iViews or pages, at level 9. When I right-click on the object and select delete, the tool for finishing the delete never appears.
    Level 8 objects are ok. I am at SAP EP V6.0 SP13.
    Has anyone else experienced problems with this. Were you able to find a workaournd?
    Help would be much appreciated.

    Hi Reidun,
    I am using EP 6.0.14.0.0
    I tried it and I am not facing this problem.
    I think..I came with a same kind of problem earlier.
    When I try to create the directory structure in my local File System using Java it was not creating deeper directories more than level 7.
    This is because of some restriction in char length I think.
    Do onething..Try to Reduce the length of your folder/roles/pages/iviews  names.
    like
    Sample :
    If you have
    "MyPCDFolderStructureOne" then reduce it to
    "PCDOne" - just for sample
    Regards,
    Karthick

  • Can we check the Objects modifiable " option for standard objects

    Dear Friends
                 In IR , we have imported SRM SERVER->SRM SERVER5.5
    Then we  have checked the option<u><b> "Objects are modifiable"</b></u> then we imported the IDOC from R/3 system under SRM SERVER 5.5 swcv.
    Then created the mapping.It is working fime.
    how ever i am not sure whether it is right process.Can we check the "Objects are modifiable" for standard compoents delivered by SAP????
    Regards
    chandra

    Hi Jai,
      <i> >>>Can we check the "Objects are modifiable" for standard compoents delivered by SAP????
    No. As best practise you are not supposed to do so.</i>
    In order to implement any changes in the mapping we can do it rite.
    Because recently i have applied one SAP note to my SRM swcv and one of the MM object was changed according to the requirements.
    Thanks,
    Prasanthi.

  • Setting the property "Cache Level" of the pcd object to "None".

    Hi all
    I have an EP 6.0 on NW04 SPS 17. I need to solve a problem and found note 960975. My question is, how could we change the setting the property "Cache Level" of the pcd object to "None"? Where should I go? Is it on the NWA, Visual Admin, Configtool or somewhere else?
    Many thanks before.
    Regards
    Agoes
    Message was edited by:
            Agoes Boedi Poerwanto

    Hi Agoes,
    By using the tool Support Desk -> Portal Content Directory -> PCD Administration you can do this. Please note that this tool should only be used in debugging situations.
    There is a new section "Release a Unit from the cache cluster wide" in this tool. With this new functionality, you can remove an object from the cache on all nodes in the cluster. If the object is still in use, it will be reread immediately from the database
    Releasing the entire PCD cache can severely affect performance. Hence, if there are inconsistencies suspected with a single object, e.g. a role or an iview, the new section "Release a Unit from the cache cluster wide" can be used to evict the given object from the cache on all nodes in the cluster.
    Cheers,
    shyam

  • OIM 11g R1: Exporting data object permissions

    Hi all,
    Does anyone know if there is anyway to export/import data object permissions on roles?
    They don't seem to be exported with the role, or with role and organization metadata. Have I missed something?
    Thanks!

    What kind of DataObject permissions are you exporting ?
    Permissions are always associated with some OIM Components. When you export that component then it will be exported Automatically.

  • Significance of Administrators Tab & Object Permissions Tab in OIM PF

    Hi,
    Can any one explain me the significance of Administrators Tab & Object Permissions Tab in OIM Process Form?
    Are they same? if I have added a group in Administrators Tab and not in Object Permissions Tab , what will be the impact of this in terms of provisioning?
    Thanks!

    Administrators Tab
    http://docs.oracle.com/cd/E10391_01/doc.910/e10363/devtools.htm#CHDHBACF
    Object Permissions Tab
    http://docs.oracle.com/cd/E10391_01/doc.910/e10363/devtools.htm#CHDGJDIC
    They are NOT the same....
    The group will be able to perform all operations even if it is not Object Permissions

  • Is it possible to export full PCD object list along with their PCD ID?

    Hi
    Is it possible to export full PCD object list along with their PCD ID to an excel sheet or txt file?
    Any help will be appreciated.
    Regards
    Vineet

    Hi,
    I have provided a simple method below to Get all the PCD objects PCD  ID.
    1. Create a transport package.
    2. Add all the PCD objects for which ever you need the PCD ID.
    3. Now release the Transport package as the "File system" mode.
    4. Once it is done successfully, it will display all the transported object and its corresponding PCD ID in a table format.
    You can simply copy and paste it in a excel to get the PCD ID for the PCD objects.
    Hope this is helpful.
    Thanks,
    Mahendran B.

Maybe you are looking for