facebook

Loading Security Tables

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #352536 Reply

    dknutson
    Member

    I’m using MyEclipse for Spring 2014. I’ve created an app using the crud scaffolding against a Sql2005 database. It work fine.

    I then added the security scaffolding. It created the 3 tables in the database, but it did not populate them.

    The same thing happened with I did the Crud tutorial with the Derby database. App created fine, added security scaffolding which created 3 tables in Derby, but the tables are empty.

    At this point, I’m not sure what is supposed to be used as the Authority entries. What does the scaffolding expect?

    #352546 Reply

    dknutson,

    Authorities table should contain all the roles ( For ex: ROLE_ADMIN,ROLE_USER,etc). In the User_Authorities table you should assign a role for each and every user.

    Here is the sample data :
    Users table – (ID – 1, ENABLED – 1, PASSWORD – 1234, USERNAME – testadmin)
    Authorities table – (ID – 1, AUTHORITYNAME – ROLE_ADMIN)
    User_Authorities table – (USER_ID = 1, AUTHORITIES_ID = 1)

    Users table – (ID – 2, ENABLED – 1, PASSWORD – 1234, USERNAME – testguest)
    Authorities table – (ID – 2, AUTHORITYNAME – ROLE_GUEST)
    User_Authorities table – (USER_ID = 2, AUTHORITIES_ID = 2)

    Hope this helps.

    #352575 Reply

    dknutson
    Member

    That worked. Thanks!

    #352592 Reply

    dknutson,

    Glad that you got it working.
    Let us know if you see any issues in MyEclipse.

    #354109 Reply

    grooup45
    Member

    The same thing happened with I did the Crud tutorial with the Derby database. App created fine, added security scaffolding which created 3 tables in Derby, but the tables are empty.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Loading Security Tables

You must be logged in to post in the forum log in