Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Admin based in ID instead of Name #95

Closed
Okeanos opened this issue Nov 10, 2013 · 2 comments
Closed

Set Admin based in ID instead of Name #95

Okeanos opened this issue Nov 10, 2013 · 2 comments

Comments

@Okeanos
Copy link

Okeanos commented Nov 10, 2013

I believe it would be a good idea to allow IDs instead of names to be used to set admin status via the config.

The ID column has to be specified already and by its very nature is guaranteed to be unique. Of course one can assume that the name is unique, however, depending on the implementation and origin this is not a given.

@crisu83
Copy link
Owner

crisu83 commented Nov 10, 2013

This is outside of the scope of this extension as it simply provides an ui for yii's built in authorization manager. I agree that this would be better but for now we're stuck with what yii provides.

@crisu83 crisu83 closed this as completed Nov 10, 2013
@Okeanos
Copy link
Author

Okeanos commented Nov 10, 2013

Actually not … you manually set the admin state in AuthWebUser()->init() based on the admins array. I don't see Yii being involved there. Switching from names to IDs would be a matter of changing the value to test against, i.e. the ID column, and providing the correct array via the config. I am just wondering whether the ID column is actually available in that context.
Checking whether names or IDs have been supplied could probably be done fairly easy as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants