How to restrict access to views for some users in the app?

Hi SDN!
I have an WD application wich embedded in the portal. Appication has 2 iViews (and 2  pages respectively). These iViews consist several views connected with each other (e.g. one view provide list data, second view is add/edit form for this data). I need to restrict access for some users for view with add/edit form. I can't make separate page for this view.
What I've done:
1) create yet another UIContainer for this view in main window and embed view to this container. It was be done for create separate iView for form.
2) in the portal I create iView for this form but don't embedd in any page.
When I try to call my form from list data (that is one iView from another) I get exception:
<b>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: duplicate usage of view .MyCarRentalAddCity</b>
Is there a way to get needed functional?
Thanks,
Lev

Hi,
do you need to remove the IView from the portal menu or do you just want to make a View container in your WD application invisible if the user doesn't have the rights to see it.
If so, you could create your own roles on the app server:
You need to create a new class that extends NamePermission like:
import com.sap.security.api.permissions.NamePermission;
public class ApplicationAccessPermission extends NamePermission {
           * @param name
          public ApplicationAccessPermission(String name) {
               super(name);
           * @param name
           * @param action
          public ApplicationAccessPermission(String name, String action) {
               super(name, action);
Also, you have to create an Action.XML file that looks like this:
<BUSINESSSERVICE
     NAME="com.vendor.administration">
     <DESCRIPTION
          LOCALE="en"
          VALUE="actions view usage"/>
     <ACTION
          NAME="View Permission">
          <DESCRIPTION
               LOCALE="en"
               VALUE="Show view"
               />
          <PERMISSION
               CLASS="com.vendor.utilities.ApplicationAccessPermission"
               NAME="ShowView"
               />
     </ACTION>
</BUSINESSSERVICE>
If you have created these to files in your packages, you can access this function like:
IUser user ;
try {
          user = WDClientUser.getCurrentUser().getSAPUser();
          if(user.hasPermission(new ApplicationAccessPermission("Show view"))){
               wdContext.currentV_UIElement().setViewVisibility(WDVisibility.VISIBLE);
          }else{
               wdContext.currentV_UIElement().setViewVisibility(WDVisibility.NONE);
     }catch (WDUMException e1) {
          wdContext.currentV_UIElement().setViewVisibility(WDVisibility.NONE);
                e1.printStacktrace();
You have to bind the ViewVisibility attribute of the context to the View Container you want to hide.
The applicationAccessPermission you defined in the XML File will be visible in the UME Manager of you J2EE engine. With this action you can create a new role and group that you can map to the users that should see you view.
But, the exception you get is because you have embedded one view twice, which is not possible.
Hope this helps.
Regards,
Dennis

Similar Messages

  • How to restrict separate payment document for each line item in APP

    HI Experts
    PLs let me know how to restrict separate payment document for each line item in APP
    Thanks
    Sneha
    Edited by: Sneha R on Apr 14, 2009 4:18 PM

    Sneha,
    If your query was to group items for payment ,in FBZP  co code data for payment method there are 2 options 1.group payment for marked items 2.payment per due date.
    Also in the Vendor master there is a flag which will ensure that each item is paid individually,if this is what you were looking for  ( FK02 change vendor).
    In case you want to group items to be paid together Payment Grouping Key can be assigned in Vendor Master .
    Shony

  • Can i use my mac mini for some users at the same time?

    can i use my mac mini for some users at the same time? i mean with their own screen, mouse, and keyboard

    If you're asking whether more than one user can use the computer at the same time with multiple displays, the answer is no. Other users can log in over a network with Screen Sharing, but each one will need his own computer (not necessarily a Mac.)

  • How to change to Icon View for some folders but and List View for the rest

    I've had a bear of a time with View options in my folders. I'd like some folders to be in Icon view and other to be in List view. For what ever reason if I change the view option of one folder it changes the view option of EVERY folder. What can I do to make this happen?

    I was about to ask the same. I'd like to use icon view normally, but list view for folders containing lots of text documents. It looks like the solution is using View > Show View Options, change the folder to the view you want, and then tick the box at the top fo the dialogue for "Always open in __ view".
    Message was edited by: Adrian Bolt
    Message was edited by: Adrian Bolt

  • How to restrict data in reports for different users...

    i created a monthly_sales report on XYZ_SALES_FACT table
    i have to give restriction on reports based on the users.
    i.e. user_1 will access only NORTH region sales info on monthly_sales report
    user_2 will access only SOUTH region sales info on monthly_sales report etc.
    Note: my client is not agreeing to create multiple reports based on the user/region.
    how i have to give user restriction on report based on the users?

    Hi,
    You can create a VPD policy and then create a login trigger and pass SSO client_indentifier or database session_user (use if/then/else to protect both)
    You can check here for the VPD/login trigger.
    Disco Config Guide
    http://download.oracle.com/docs/html/B13918_03/security2.htm#sthref1002
    OTN articles
    http://www.oracle.com/technology/obe/10gr2_db_vmware/security/vpd/vpd.htm
    http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_security.html
    You can also use secure views, mandatory conditions in the EUL, etc.
    Some other related forums entries:
    Re: Using VPD with Oracle Discoverer without SSO
    Re: Restrict Data for a user without VPD
    May want to search, likely many others on the subject.
    Should give you a good place to start.
    Regards,
    Steve.

  • How  to Restrict G/L Accounts for One  User

    Hi All,
    I have to restrict the G/L Account when doing FI Postings  for  some particular Users ...
    Ex 100000 Is G/L to be Posted In  XXXX Plant.
         100001 Is G/L to be Posted in  YYYY  Plant 
    I have to give an Authorization  to User in XXXX Plant  to Post only  in 100000 G/L .
    Plz Suggest me at which level I can restrict the Postings ..
    Regards,
    Sriram.

    How about flagging the accounts as "Automatically posted only" and then let customizing take care of the ability to post to the accounts (automatic account determination)?
    That is, if that works for these specific accounts.
    Cheers,
    Julius

  • Restrict access on login to some users

    Hi
    I'm building an appllication for internal use and i need to restrict access to some users... Is it possible to do that during login, considering that the authentication scheme selected is "Database Account"...?
    I thank in advance all your replies!

    Hi
    Thank you for your reply.
    I liked your suggestion of setting a condition on the login process on logon page and it's exactly what i want... But it's not working... If i set the condition when the login button is pressed, no one enters the application... If i don't set it that way, all users enter, including the ones on the "exclude list"... I'm using condition type ="SQL Expression".
    What might i be doing wrong?
    Best regards

  • Issue with the Document Viewer for Some Users

    Hi, I have archivelink setup in our system. Users are able to view the documents using this link. But issue is that one user is unable to view the documents while others can view the documents.  The roles for both users are same.
    Searched the forums but found nothing. Acrobat Reader version is 9.

    hi can you help me, im a desktop support engineer we got 2 users who have the exact same problem as in the call ive made here?
    nothing being displayed in Document Viewer for 720 gui user via Webportal
    any ideas, if they log onto other windows 7 machines still dont work

  • HT201365 How do I access my inbox for mail? and close apps I am done using?

    I am having trouble getting into my mail inbox and also
    closing apps I am done using. Today is the 1st day
    I am using the IOS7 update.

    For the inbox try removing the account then adding it back in. To close apps double-click the home button then slide upward on the app you wish to close.

  • How do I install new themes for keynote purchased throught the app store?

    I have downloaded some Keynote themes fron a site but I have no way (that I can see) to install them. I've done extensive googling and I always find instructions that say that I have to add the downloaded themes (.kth files) into the ~/Library/Application Support/Keynote/Themes folder. However, I have no such directory.
    I purchased Keynote via the App Store. Could this be the reason why I don't have this directory on my hard disk? How does one install new themes then?
    Thank you.
    While I am at it and since there must be a lot of Keynote experts around, I'll ask another question about a problem that is driving me crazy. I'm one of those thousands of new converts and I have a lot of old PowerPoint files that took me a lot of time to create. I'm trying to import them into Keynote but some of them are giving me trouble. The problem comes when I try to change the theme (I just want to change the background). When I have complex slides involving many objects, if I change the theme all these objects abandon their original positions and everything becomes garbled. I think this has to do with the aspect ratio of the slides but I haven't found any way of fixing it. No matter what size I choose in the Theme Chooser, the result is the same.
    I would really appreciate any help you people can offer with any of these problems. Thanks in advance.
    JM

    OK, I'll answer myself since I found an answer to my first question. It was right here in the forums. I'll post a link to it in case someone reads this thread looking for an answer:
    Using 3rd Third Party Themes - The Manual Way to Import
    Now, if I could just find an answer for my second question...
    JM

  • How to open another iphoto library for another user on the same account.

    i have two users on the same imac that are actvie users of iphoto. how do i open a new library for the second user since the admin user has automatically gotten their own?

    On the same account?
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library'
    The same keystroke on launch will allow you to choose which Library to open.

  • HT4528 I've had my iPhone for about a year now, but for some odd reason the "App Store" isn't showing up on my phone and I can't install/delete any apps. Help?!

    So I've had my iPhone 4 for almost a year now and I've never faced this problem. I cannot access the app store because it isnt on my phone.

    Go to http://iforgot.apple.com and sign in with your iCloud login. A new password will be sent to your associated email address. If this doesn't work you will have to contact Support. Go to https://getsupport.apple.com. Click' See all products and services', then 'More Products and Services, then 'Apple ID', then 'Other Apple ID Topics' then 'Lost or forgotten Apple ID password'.

  • Restricting access to reports for certain users

    Hi,
    We have few reports on a Multicube with Reporting unit authorization object. A certain group of users has this authorization. Now, we want a few of these users not to have access to one particular report on this multiprovider.
    Can anyone suggest a way to achieve this?
    Thanks,
    Abhishek.

    Abhishek,
    Use S_RS_COMP authorization object to restrict by queries. You can create 2 roles based on this object, one role with access to all the queries. The second one will have access to all but one. You can assign this role to relevant people.
    Although, this is slightly more maintenance intensive as every time a new query is created, someone has to add the query to one fo the roles based on security required.
    -Saket

  • How to Block Account member in input reporting for some users?

    Hi experts, i need to know if is possible to block input of values for some Users in the Account Dimension so that some users can input value in the report but other user cant do it.
    I try to do this from "member access profile" but this option only allow you to define access right for one specifict parent o member.
    I mean, is posible to asigned to Account Dimension a Propertie type "OWNER" like ENTITY?
    For example: one user must to input value for the Account member "CASH", but other user dont, however i have to show the same input reporting for both users.
    I hope understand the question, im sorry about my english
    thank you in advance
    Ignacio Vazquez

    I would think you could do one of the following:
    Either set account as a secured dimension.  You would then define security profiles for all account groups and assign those to your users / teams as appropriate.  Would take a while to setup initially, but if your users don't change that much it shouldn't be too difficult to manage once it's done.
    Setup different input templates that only showed the accounts you wanted each group of users to see.  Put the templates in different site folders and assign access to those sites as required.  users would then only have access to open the template applicable to them.  Would require that you basically make duplicate copies or your current template, modify and save to different site folders which could become a pain if the template requires changes (since you would now have to make the same change multiple times).
    Setup a macro in the current template so that you need to enter a password to unlock the send commands for the respective accounts.  I don't know if it can be setup to support multiple passwords - assuming it can, password 1 would unlock all accounts, password 2 would only unlock CASH accounts, password 3 would only unlock LIABILITY accounts, etc.  You then distribute the passwords to the users as appropriate.
    Hope that helps.

  • The answers questions not selectable in quiz slide for some users

    We have a SCORM Captivate training content published on our LMS (SAP Learning Solutions). Some users can't respond to any questions in the content.For these users, the answers are locked and are not selectable. Also, the Validate and Erase buttons didn't appear.
    The problem concerns about 10% of our users.
    This training contains both content slides and quiz slides.
    The content is published in SCORM 1.2 (SWF + HTML) with Adobe Captivate 5.5. We had the same problem for some users with the previous version of this training content published with Captivate 4.
    All users have the same settings:
    Flash Player 10.3.183.11
    Internet Explorer 6
    Microsoft Windows XP

    The most likely reason for this behaviour is that your 10% of users have entered the quiz and then thought they might jump back to the information slides to check the answer.  On doing so they have exited the quiz scope which immediately locks the quiz.
    Have you actually watched these problem users complete the quiz?  If you are able to do so, make sure that once they start the first question, they answer all quiz questions in turn without jumping to any other slides or leaving the quiz.  If my hunch is right, the person will be able to successfully complete the quiz.
    If the desire is to allow users to jump back to the content section to check information, place a scored button on the first or second slide of your project.  This extends the quiz scope and will mean that the user is still within the "quiz" no matter what slide they want to look at.

Maybe you are looking for