Would it be possible to enhance the existing implementation by allowing the retrieval of roles and permissions from the database? Essentially, there would be no static authorization rules file, and filtering would be done based on the roles and permissions in the database?
Yes, that is certainly possible. There were some first steps already. Please have a look at the mailing list archive.
Hi, thanks for your response. Unfortunately, I'm new to GitHub and I don't know where the mailing list archive is.
It is in the README: http://groups.google.com/group/declarative_authorization/
Hi, I want to script a reader that uses the database! How can i do it? I want to make a script that reads out all controllers and actions of my application so that i can generate, over a view, all roles. My problem is the reader. Who can i find a database reader example?
There now is a branch with-abstract-reader that has an updated patch applied. Would be great to see a database reader implemented.
Oh thank you a lot! Can you give me some input how to start with the development in the reader. For example a list which methods I have to change. The database design is not a problem for me, but the first code lines in the reader with the first database calls. Do I have to change at first the method "def self.load (dsl_files)"?
Do I have to outsource all in a db_reader.rb? Same for the file reader to a file_reader.rb?
I am very newbie in Rails, but I still want to make this work! :)))
I'm trying to store permissions and roles in the database but I need a way to reload authorization rules after I update the permissions of a role.
Is it possible?
That should be possible. Have a look at Engine.instance (authorization.rb). If you pass in dsl_file, the rules are reloaded.
Has any progress been made on this front? I need a flexible method to assign and manage role capabilities and having them stored in a database would be ideal. But everything here is pretty old, and it doesn't look like anything has been done in the last couple of years.