How can i manage the role and give permission using fuelphp framework. for example, i want to give read,delete permission to user level and want to give read,edit,delete permission to admin level.
in this page you can find many good things!about auth, but i do this, create all users in for example "user" group, then define some roles or use existing roles, such role "user" and "admin" for admin users, now you can assign each user to any role.
then define some permissions in database for example define this: area : site permission : blog actions : read , add , edit , delete
now you can easily add role_permissions to database , just use role's id and permission'id into data base,
also you can use "groups" instead of "roles" or assign permissions to user itself,
you can find all code snippets for creating or assigning in auth and orm documents, and i think you probably will use ormauth for this.
and about controlling access to your pages, you can create a base controller for checking uses's permissions in "before" function or simply use \Auth::has_access('...') function for control user's permissions,
here is a really basic module i have created for my next application using fuelphp, i is really simple :( and realy does not any thing but i have used this method in it, you can see them in main.php controller,
thank you Mr.nasserman for your suggestion.but can you direct to me any simple tutorial link? i can't easily understand your code because i am beginner. Could you teach me please?
:) I am beginner too, i don't have link or tutorial page but every think you may need you can find in documents, if i can, i will write some inline-documents for my code (it is really simple !)
:) I am beginner too, i don't have link or tutorial page but every think you may need you can find in documents, if i can, i will write some inline-documents for my code (it is really simple !)