Database-driven authorization #13

Open
tsukhani opened this Issue Nov 25, 2009 · 9 comments

5 participants

@tsukhani

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?

@stffn
Owner

Yes, that is certainly possible. There were some first steps already. Please have a look at the mailing list archive.

@tsukhani

Hi, thanks for your response. Unfortunately, I'm new to GitHub and I don't know where the mailing list archive is.

@phlegx

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?

@stffn
Owner

There now is a branch with-abstract-reader that has an updated patch applied. Would be great to see a database reader implemented.

@phlegx

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! :)))

@bishma-stornelli

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?

@stffn
Owner

That should be possible. Have a look at Engine.instance (authorization.rb). If you pass in dsl_file, the rules are reloaded.

@sroutier

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment