Welcome Guest, Not a member yet? Register   Sign In
DX Auth 1.0.6 (Authentication library)
#31

[eluser]dexcell[/eluser]
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

[eluser]RHAngel[/eluser]
Thanks for update, will try new version. Smile
#33

[eluser]RS71[/eluser]
[quote author="dexcell" date="1228212179"][quote author="RS71" date="1228191879"]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[/quote]

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.[/quote]

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

[eluser]dexcell[/eluser]
[quote author="RS71" date="1228253286"][quote author="dexcell" date="1228212179"][quote author="RS71" date="1228191879"]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[/quote]

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.[/quote]

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.

[/quote]

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.

Quote: 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

[eluser]nodulia[/eluser]
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

[eluser]tdktank59[/eluser]
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

[eluser]a&w[/eluser]
Just curious why you wouldn't try to implement KhACL?
#38

[eluser]RS71[/eluser]
[quote author="dexcell" date="1228254253"][quote author="RS71" date="1228253286"][quote author="dexcell" date="1228212179"][quote author="RS71" date="1228191879"]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[/quote]

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.[/quote]

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.

[/quote]

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.

Quote: 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.[/quote]

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

[eluser]dexcell[/eluser]
Quote: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:
Code:
$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

[eluser]dexcell[/eluser]
[quote author="tdktank59" date="1228267516"]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)[/quote]

Actually, i just follow CL Auth idea, and add mine Smile

I haven't check your auth library, maybe i'll look for some ideas there later Tongue




Theme © iAndrew 2016 - Forum software by © MyBB