3 Replies Latest reply on Mar 2, 2010 6:32 PM by ssamayoagt

    Custom Identity

    ramansheshadri

      Hi,


      We are using Seam 2.0.X version. We have a situation  where based on user login, we have some set of privileges which is associated to user role. Based on these privileges pages will be loaded with activities like add a record or delete a record.


      How to achieve for this as we cannot use security rule as code controlling will be difficult. How can we achieve using custom identity

        • 1. Re: Custom Identity
          ssamayoagt

          Check in SEAM's 2.0 for JpaPermissionStore(), Identity.hasPermission(), Identity.hasRole(), those doesnt use drools.
          Im not sure if they appeared in such version or later.
          Regards.

          • 2. Re: Custom Identity
            ramansheshadri

            seams's Identity.hasPermission() are with parameters and these parameters are like action , name which internally checks at security rules. This way we can't achieve since it involves rules.

            • 3. Re: Custom Identity
              ssamayoagt
              I dont understand what you want.

              What you describe in your post is a simple user / role / permission scneario.

              What you mean with "This way we can't achieve since it involves rules"?

              After all you have some sort of rules to follow to acomplish what you want.

              Show/hide a "delete button" should be as simple as:

              rendered="#{s:hasPermission('customer','delete')}"

              So?