ruby on rails - Use nested controller or declarative authorization for admin action? -
Say, I have an app with many models: posts, blogs, toads etc and I want to send an admin to Edit, delete, post all users, blogs, todos, can I create a nested admission controller for each or use the declaratory authorization to set up an administrator account that can edit / delete user, post etc. ?
I understand that it has no right to answer, I am just looking for the easiest and best way to do this.
Thank you
In the manner of organizing the status of your administrator, the declaration authorization Completely different. These are not a different option for the same problem. How do you authorize actions or have no relation to access control, whether your admin interface uses nested controllers and a different interface or uses the same interface as regular users with some other buttons.
He said that I think what you want to ask, should take a bag on it: should your administrator interface be similar to your user interface but with some more buttons for admin tasks ?
My answer will not be for the simplest sites too. Imagine going to each and every post and clearing spam from each post on your blog.
Now imagine if you have any comments from the date.
Whom do you like?
Now if you decide that your controllers have a custom interface that suits their needs then you need to ask them to be nested.
Comments
Post a Comment