coolcsn / CsnAuthorization

Authorization module for Zend Framework 2
BSD 3-Clause "New" or "Revised" License
13 stars 15 forks source link

Fatal error: Uncaught exception 'Zend\Permissions\Acl\Exception\InvalidArgumentException' with message 'Role 'guest' not found' #9

Open octans opened 10 years ago

octans commented 10 years ago

after install 'csn-user' and 'csn-authorization', everything is good, but when I set 'use_database_storage' to be true in file 'acl.global.php', and then the error occured,

Fatal error: Uncaught exception 'Zend\Permissions\Acl\Exception\InvalidArgumentException' with message 'Role 'guest' not found'

that's because in db sql file 'csn-user/data/SampleData.sql', the rows inserted into table 'role' are 'Guest', but in the file 'CsnAuthorization\Acl\Acl.php', the 'DEFAULT_ROLE' is set to be 'guest'.

coolcsn commented 10 years ago

Please, make sure there is a role "guest" in the database role table. We will check and fix this bug in the next release.

adarshkhatri commented 9 years ago

Need to rename all "Guest, Member, Admin" to small letter as this: "guest, member, admin" in database.

wingman007 commented 9 years ago

adarshkhatri: Thank you very much for the information! Since the modules are created from different people there are some problems.