0 Replies Latest reply on Sep 25, 2008 10:43 AM by thanks fish

    Programmatic security

    thanks fish Newbie

      Hi there,

      Maybe this is a silly question, however....

      I have security roles in my portlet.xml which i check using isuserinrole in my portlet java file:

      System.out.println("checking roles in java");
      if (request.isUserInRole("Admin")) {
      System.out.println("in Admin");
      }
      if (request.isUserInRole("User")) {
      System.out.println("in User");
      }

      This prints "in User" when i run the portlet.
      If I duplicate that code in a scriptlet in the destination jsp I get no output (ie isuserinrole always returns false).
      How is this possible, have i missed something obvious ?

      Thanks for any help.