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

[eluser]RS71[/eluser]
Yep.

You could take roles_id into its own table so you can have multiple roles and multiple groups but that would be yet another table to access (personally, I don't think that is needed. most people will probably be good with one role and multiple groups)

With the groups table, you can build as many tiers of access as you want.
#92

[eluser]tdktank59[/eluser]
Or you could just run it all off groups lol... and get rid of a table... because you could run it like this

Code:
user
{
user_id
username
}

user_to_group
{
user_id
group_id
expires
}

group
{
group_id
group_name
group_desc
}

then the groups are assigned the permissions

With the roles and groups you would have the above but with below and two tables for the permissions 1 for roles 1 for groups...

Code:
user
{
role_id
}

roles
{
role_id
role_name
}

SO if you think about it just running groups would be easier...
And when you want to check for permission you just limit to 1 and search for the access where group_id in groups or something like that

If I can find my working example ill show you what I mean.
#93

[eluser]RS71[/eluser]
I do understand what you're talking about, its what I had in mind.

Heh but yeah you could just do with one table. In my case I'm gonna have to go with the role_id field and the groups table since the majority of my users will just have a general master permission ('User'). That way I just access one table at login (the users table) and only depending on the users Role will the system check the Groups. And will spare me from making a row for every user (which I probably would have to make 4 mil of =/ )
#94

[eluser]tdktank59[/eluser]
Well yeah i guess that works!

The role is there main role and groups just extend their permissions

Just remember deny access by default and grant access as needed (saves rows in the tables)
#95

[eluser]RS71[/eluser]
I have yet to look through the actual lib heh but what about these optional features?

Log after X failed attempts (username tried, time, ip, etc)
Login time out in case of X login failures

I'm probably forgetting to mention something else hrmm
#96

[eluser]bugboy[/eluser]
Ok just installed this and after reading through the thread to get everything working and changing a couple of things to get it running smoothly i think its great.

I'm going to integrate it in to some modules.

GREAT WORK Smile
#97

[eluser]Mat-Moo[/eluser]
I'm looking at upgrading an old php app I have which has already has a database of users/passwords/info. What I'd like to do is somehow bring this info/use this info in DX_Auth, however I don't have a "Username" per person field (just full name which is not unique). DX_Auth allows me to use email to login with, but register requires a Username? So is there anyway to use this without the Username? or do i just use something randon or abandon the idea?
#98

[eluser]dexcell[/eluser]
[quote author="bugboy" date="1228439681"]sweet

cheers

does it use the new form validation class? I suppose that comes down to the user making the forms though[/quote]

Correct. The library have nothing to do with form validation class.

It's your choice to use new form class or old form class.
DX Auth library only give you function for you to be used in your form validation callback function.

You can see the example in controllers/auth.php
#99

[eluser]dexcell[/eluser]
[quote author="Mat-Moo" date="1228517620"]I'm looking at upgrading an old php app I have which has already has a database of users/passwords/info. What I'd like to do is somehow bring this info/use this info in DX_Auth, however I don't have a "Username" per person field (just full name which is not unique). DX_Auth allows me to use email to login with, but register requires a Username? So is there anyway to use this without the Username? or do i just use something randon or abandon the idea?[/quote]

The username is important part in DX Auth(for example: it's used in activate user, forgot pass, etc),
but in your case, you can do some script to create unique username from their email since i believe that email is unique. for: example, email: [email protected] become john_doe_mymail.

[eluser]dexcell[/eluser]
[quote author="RS71" date="1228451105"]I have yet to look through the actual lib heh but what about these optional features?

Log after X failed attempts (username tried, time, ip, etc)
Login time out in case of X login failures

I'm probably forgetting to mention something else hrmm[/quote]

No, this will be up to user to code.

In the auth.php example, there is a code to show captcha after failed login attempts, so it's up to user to do what ever they want.




Theme © iAndrew 2016 - Forum software by © MyBB