4 Replies Latest reply on Sep 8, 2009 6:35 AM by praty

    Security: Adding User Permission for admin!

    praty
      Dear Team,

      1. I followed steps and deployed the project as http://relation.to/Bloggers/PutSeamsIdentityManagementToPracticeUsingSeamgen

      However I'm unable to login. It throws 'Login Failed'. Please confirm what should be my table contents [now they are empty] to begin with.

      2. Does seam provide any fine-grain support for records-level permissions? Any best ways to implement it?

      Thanks
        • 1. Re: Security: Adding User Permission for admin!
          josdaniel

          Make sure you have the contents of examples/seamspace/resources/import.sql published in your database, then you should be able to login using any of the default users

          • 2. Re: Security: Adding User Permission for admin!
            praty
            Thank you Joshua, for the clue!

            There were difference between table names generated by 'seam-gen' and 'import.sql'. So entered the table data manually:

            user_account:
            1;TRUE;"admin";"admin"
            2;TRUE;"demo";"demo"
            3;TRUE;"friend";"friend"

            user_permission:
            1;"seam.user";"read";"admin";"role"
            2;"seam.user";"read";"demo";"role"
            3;"seam.user";"read";"friend";"role"

            user_role:
            1;"admin";TRUE
            2;"user";TRUE

            user_account_role:
            uID;rID
            1;1
            2;1
            3;2

            Using hash="none" able to login. However, unable to view 'UserManager' and 'RoleManager' coz:

            SEVERE: Error Rendering View[/useradmin/usermanager.xhtml]
            javax.el.ELException: /useradmin/usermanager.xhtml: org.jboss.seam.security.management.NoSuchUserException: No such user ''

            The org.jboss.seam.security.management.userSearch.loadUsers() is fetching the available user. However the list of user's is not displayed. What am I missing?

            Note: The code is the default w.r.t http://relation.to/Bloggers/PutSeamsIdentityManagementToPracticeUsingSeamgen

            • 3. Re: Security: Adding User Permission for admin!
              josdaniel

              I am not sure about the problem being faced by you, but Seam 2.2.0 examples/seamspace does seem to work out of the box.

              • 4. Re: Security: Adding User Permission for admin!
                praty

                Thank you Joshua, for the reply!


                The problem was silly. The Richfaces.3.3.1 jars were not exploded/deployed to server coz they were only in build path. Now its working fine!