Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
save actions in role/user/group _permissions
Hi , We can use Auth_Group/User/Role..permissions for assigning permissions to groups/users/roles, also we can specify actions using an array :
Auth_rolepermission::find(x)->actions = [ 1 , 2, 4];
it is ok but is it better to save name of actions instead of index number?
Auth_rolepermission::find(x)->actions = [ 'view' , 'add' , 'edit_own' ];
is it possible?
No, it has to be index numbers, so your interface must convert them. Something else is not supported at the moment.
What is the best practice for a cms like system :
this is in mind that site's admin user :
can do :
add/edit/ users , add/edit roles , assign user-role , assign user-permission , assign role-permission ,
can not do :
add/edit groups just select defualt groups for new registered users or assign users-groups ,
add or edit permissions and their actions,
note : i did not let user to edit groups for make it simple to set ACLs and prevent possible issues, so all users of system belongs to "user" or "banned" or "public" groups.
I don't understand what your question is.
am creating a sample application that site admin will be define access rules, for example i will have a blog, admin will be able to set witch one can add new post, or witch riles can add or edit posts, and so on, admin in his control panel will manage roles,users and assign roles and permissions,
i just asked what is the best way for do this. in some systems there is roles or groups, but in fuelphp we can use roles and groups but i want to ignore groups (just use groups for development) and just use roles. never mind maybe this question is not good question,
thanks for reply.
I agree with you, use Roles where you can, Groups where you must.
A role is linked to tasks you have to perform, so it's a lot more logical to use roles. You need to use groups if you have to "group" of users that have no activities in common, for example a project team that needs access to their own secure project forum. You could say "project member" is a role, but it quickly gets out of hand if you have 25 diffferent projects...
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion