Updated the download. see first page, there is also change log available.
If you already downloaded previous version, i encourage you to download this latest version.
There is some file i recall forgot to add in previous version.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
December 01, 2008 6:14am
Subscribe [160]#31 / Dec 02, 2008 2:06am
Updated the download. see first page, there is also change log available.
If you already downloaded previous version, i encourage you to download this latest version.
There is some file i recall forgot to add in previous version.
#32 / Dec 02, 2008 5:36am
Thanks for update, will try new version. 😊
#33 / Dec 02, 2008 11:28am
Is there a way to have Roles and Groups? In the sense that Groups would be within Roles?
So user ‘Joe’ for example could have a general role of ‘User’ and belong to group ‘Group_a’. So that ‘Joe’ only has the permissions of an ‘User’ role but also can only edit/view pages that belong to his ‘Group_a’ group.
If he tried to edit for example: http://www.site.com/item/edit/20456/ and that item didn’t belong to his group, he wouldn’t be able to edit it.
Err.. do you understand? heh
You can achieve this using role_uri table, see documentation in table anatomy about role_uri table, and see documentation about check_role_uri() function in function documentation.
Hello,
I’ve taken a look at the documentation and I believe it wouldn’t necessarily be able to achieve it.
It’d be nice to have a ‘group_id’ field in the ‘users’ table and have a is_group() function. So group would be in a way a sub-role. Roles could be used to separate Guests, Users, Admins, etc and groups could be used for example for different types of Users.
The check_role_uri() function depends on roles so if I wanted to have different types of Users, and still have Admins and Guests I’d have to have for example:
Guests, User1, User2, User3, Useri, Admin (as roles)
which would be a hassle when trying to do a general separation of guests from users and admins. Also, the way check_role_uri() works, it wouldn’t be very good for dynamic content I believe.
I could be wrong though…
Thanks in advance.
#34 / Dec 02, 2008 11:44am
Is there a way to have Roles and Groups? In the sense that Groups would be within Roles?
So user ‘Joe’ for example could have a general role of ‘User’ and belong to group ‘Group_a’. So that ‘Joe’ only has the permissions of an ‘User’ role but also can only edit/view pages that belong to his ‘Group_a’ group.
If he tried to edit for example: http://www.site.com/item/edit/20456/ and that item didn’t belong to his group, he wouldn’t be able to edit it.
Err.. do you understand? heh
You can achieve this using role_uri table, see documentation in table anatomy about role_uri table, and see documentation about check_role_uri() function in function documentation.
Hello,
I’ve taken a look at the documentation and I believe it wouldn’t necessarily be able to achieve it.
It’d be nice to have a ‘group_id’ field in the ‘users’ table and have a is_group() function. So group would be in a way a sub-role. Roles could be used to separate Guests, Users, Admins, etc and groups could be used for example for different types of Users.
The check_role_uri() function depends on roles so if I wanted to have different types of Users, and still have Admins and Guests I’d have to have for example:
Guests, User1, User2, User3, Useri, Admin (as roles)
which would be a hassle when trying to do a general separation of guests from users and admins.
Yes, you have to create roles such as guest, user, moderator, admin, etc, and define each role access in role_uri table. I think it’s not necessary to have user group since you can do it this way, it will makes too complicated and confusing.
Also, the way check_role_uri() works, it wouldn’t be very good for dynamic content I believe.
I could be wrong though…
Thanks in advance.
There is nothing bad using check_role_uri() with dynamic content.
#35 / Dec 02, 2008 3:04pm
Hello,
I have try it this morning and it’s works fine.
thanks for your work
Have you examples to add a user profile as an identifier of another table or additional fields in the register form?
Thanks a lot
#36 / Dec 02, 2008 3:25pm
Very nice
However it would be nice to have multiple roles!
Also looks like you took some of my ideas from yaas lol Anyways ill see what I can do to add some more features (more roles)
#37 / Dec 02, 2008 4:03pm
Just curious why you wouldn’t try to implement KhACL?
#38 / Dec 02, 2008 4:10pm
Is there a way to have Roles and Groups? In the sense that Groups would be within Roles?
So user ‘Joe’ for example could have a general role of ‘User’ and belong to group ‘Group_a’. So that ‘Joe’ only has the permissions of an ‘User’ role but also can only edit/view pages that belong to his ‘Group_a’ group.
If he tried to edit for example: http://www.site.com/item/edit/20456/ and that item didn’t belong to his group, he wouldn’t be able to edit it.
Err.. do you understand? heh
You can achieve this using role_uri table, see documentation in table anatomy about role_uri table, and see documentation about check_role_uri() function in function documentation.
Hello,
I’ve taken a look at the documentation and I believe it wouldn’t necessarily be able to achieve it.
It’d be nice to have a ‘group_id’ field in the ‘users’ table and have a is_group() function. So group would be in a way a sub-role. Roles could be used to separate Guests, Users, Admins, etc and groups could be used for example for different types of Users.
The check_role_uri() function depends on roles so if I wanted to have different types of Users, and still have Admins and Guests I’d have to have for example:
Guests, User1, User2, User3, Useri, Admin (as roles)
which would be a hassle when trying to do a general separation of guests from users and admins.
Yes, you have to create roles such as guest, user, moderator, admin, etc, and define each role access in role_uri table. I think it’s not necessary to have user group since you can do it this way, it will makes too complicated and confusing.
Also, the way check_role_uri() works, it wouldn’t be very good for dynamic content I believe.
I could be wrong though…
Thanks in advance.
There is nothing bad using check_role_uri() with dynamic content.
To each his own I guess.
If I went your route, and lets say I wanted to email all roles related to Users it would be rather complicated would it not? I’d have to have the app, look through all roles and figure out which are Users and which are not. Same thing if I wanted to change permissions (like read/write/delete) on all regular Users roles, it would be a burden if I had something like 500 roles. I would have to alter 500 records instead of 1.
I don’t feel like explaining the check_role_uri() right now though.
Thank you for the comments.
#39 / Dec 02, 2008 4:48pm
If I went your route, and lets say I wanted to email all roles related to Users it would be rather complicated would it not? I’d have to have the app, look through all roles and figure out which are Users and which are not. Same thing if I wanted to change permissions (like read/write/delete) on all regular Users roles, it would be a burden if I had something like 500 roles. I would have to alter 500 records instead of 1.
I don’t feel like explaining the check_role_uri() right now though.
Thank you for the comments.
I don’t see why it’s a burden because you can use loop, and the code is in the backend.
Just in case, illustration:
$this->load->model('dx_auth/users', 'users');
$users = $this->users->get_all()->result();
// Add user related roles
$user_related_roles = array('user', 'admin', 'moderator');
foreach ($users as $user)
{
if (in_array($user['role_name'], $user_related_roles)
{
//Do email.
}
}#40 / Dec 02, 2008 4:58pm
Very nice
However it would be nice to have multiple roles!
Also looks like you took some of my ideas from yaas lol Anyways ill see what I can do to add some more features (more roles)
Actually, i just follow CL Auth idea, and add mine 😊
I haven’t check your auth library, maybe i’ll look for some ideas there later 😛
#41 / Dec 02, 2008 5:05pm
Hello,
I have try it this morning and it’s works fine.
thanks for your work
Have you examples to add a user profile as an identifier of another table or additional fields in the register form?
Thanks a lot
No problem 😊 Actually i also using it for my coming project.
Sorry but i don’t really understand the question, i think you might want to see the event documentation, and open DX_Auth_Event.php in libraries.
You can see the example there how to add user profile when user register, and add your own code.
#42 / Dec 02, 2008 5:07pm
Very nice
However it would be nice to have multiple roles!
Also looks like you took some of my ideas from yaas lol Anyways ill see what I can do to add some more features (more roles)
Actually, i just follow CL Auth idea, and add mine 😊
I haven’t check your auth library, maybe i’ll look for some ideas there later 😛
Basically I was planning multiple groups/roles so a user can be an admin, user, moderator, donator etc… or any one of those. Multiple subscriptions to different parts of sites based on group permissions. (aka roles).
Other than that it looks like you have everthing else I was planning!
#43 / Dec 02, 2008 5:08pm
Just curious why you wouldn’t try to implement KhACL?
Well actually i don’t what is that,
but i search in google and found the link in CI forum.
I will look there later.
#44 / Dec 02, 2008 5:14pm
Basically I was planning multiple groups/roles so a user can be an admin, user, moderator, donator etc… or any one of those. Multiple subscriptions to different parts of sites based on group permissions. (aka roles).
Other than that it looks like you have everthing else I was planning!
Well just get idea how to code for multiple roles,
to support multiple roles/group in DX Auth you need to put thing like this in your config
$config['user_roles'] = array('admin', 'moderator', 'dontator');then in code
if ($this->dx_auth->is_role($this->config->item('user_roles'))
{
echo 'You are a user';
}#45 / Dec 02, 2008 5:20pm
why code for that…
It makes it a mess if you add a new role down the road…
Have the uri role stuff run from the database and be dynamic is what im saying.
Say you have a basic user, with a subscription for 30 days to a donator role. Instead of reasigning them to the basic user role after the 30 days the donator role just goes away.
Allowing you to just assign the basic permissions to the donator role instead of having to repeat everything from the user role into the donator role.
Meaning take this example for the permissions
User
{
Login
Welcome
Logout
}
Donator (inherits user)
{
videos
email
advanced search
}
so you can just stack them on and on… Allowing 1 user to belong to many roles and have access to diffrent parts of the site
Also using cpanel is a bad idea since some hosting companies use cpanel so it would be an invalid link and something would break…