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

[eluser]dexcell[/eluser]
[quote author="nodulia" date="1228266275"]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[/quote]

No problem Smile 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

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

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

[eluser]dexcell[/eluser]
[quote author="a&w" date="1228269835"]Just curious why you wouldn't try to implement KhACL?[/quote]

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

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

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

Code:
$config['user_roles'] = array('admin', 'moderator', 'dontator');

then in code

Code:
if ($this->dx_auth->is_role($this->config->item('user_roles'))
{
  echo 'You are a user';
}
#45

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

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

Why code? well because it will need another table Tongue
But i've got your idea, basically it was to prevent putting the same URI permission again and again in the role_uri table.

I will consider to add inherit table in the future then. (Or maybe adding parent_role_id field in roles table)

So for example, a user have role_id 3 (donator), and in inherit table role_id 3 has parent role_id 1 (user).
So in role_uri table permission, role_id 3 will also follow role_id 1 permission.

Well, cpanel it's only an example you can rename it to what you want.
but isn't CI application will be installed in public_html folder? which is don't have relation with web hosting config? CMIIW.
#47

[eluser]Waiel[/eluser]
thanks dexcell

I'm going to use it in my current project and I'll give you my feedback later.

Thanks again for releasing it
#48

[eluser]RS71[/eluser]
[quote author="dexcell" date="1228272512"]
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.
  }
}
[/quote]

I'm not talking about going through the users and finding all that belong to a single o a couple roles. If I had 500 roles, being 1 Guest, 1 Administrator and the rest (498) being various Users, it gets slightly 'ugly' trying to group all Users together.

[quote author="tdktank59" date="1228274458"]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.

so you can just stack them on and on... [/quote]

[quote author="dexcell" date="1228276425"]
I will consider to add inherit table in the future then. (Or maybe adding parent_role_id field in roles table)

So for example, a user have role_id 3 (donator), and in inherit table role_id 3 has parent role_id 1 (user).
So in role_uri table permission, role_id 3 will also follow role_id 1 permission.[/quote]

^ what i've been trying to suggest...
#49

[eluser]tdktank59[/eluser]
[quote author="dexcell" date="1228276425"]
Why code? well because it will need another table Tongue
But i've got your idea, basically it was to prevent putting the same URI permission again and again in the role_uri table.

I will consider to add inherit table in the future then. (Or maybe adding parent_role_id field in roles table)

So for example, a user have role_id 3 (donator), and in inherit table role_id 3 has parent role_id 1 (user).
So in role_uri table permission, role_id 3 will also follow role_id 1 permission.[/quote]

Why do that. add 1 more table remove a field and it should be good

User
user_to_role
role

So now they can have multiple roles, Check the roles uri stuff and select one result, They only need to have the access once to make it work!

If you want to hold off on this ill be adding it anyways, I have a mostly working copy at home as far as what im talking about so. Ill leave this up to you.

Pretty much its adding a more boarder approach.

[quote author="dexcell" date="1228276425"]
Well, cpanel it's only an example you can rename it to what you want.
but isn't CI application will be installed in public_html folder? which is don't have relation with web hosting config? CMIIW.[/quote]

Yes, but www.yoursite.com/cpanel links to the cpanel from the host...
so if they do the mod rewrite your example breaks if the index.php is there then it wont but alot of people using CI use mod rewrite to remove the index.php
#50

[eluser]tdktank59[/eluser]
I also believe there is a problem with PHP5

http://offroadwars.com/index.php/auth

fresh install properly configured to work etc... then threw DX Auth on top of it.




Theme © iAndrew 2016 - Forum software by © MyBB