Closed (duplicate)
Project:
CAS
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
11 Feb 2011 at 22:56 UTC
Updated:
15 Feb 2011 at 01:06 UTC
Jump to comment: Most recent file
Comments
Comment #1
metzlerd commentedI also took away the 'cas' constant, as it seems to add no value.
Comment #2
metzlerd commentedOn second thought, renaming both hooks, because hook_auth_transform should go away when we remove the dependency on external authmap tables.
Comment #3
bfroehle commentedMissing an underscore.
Missing an underscore.
We never use $return, so we can get rid of that.
Revised patch attached.
Comment #4
bfroehle commentedSince we are renaming the hooks already, I suggest we choose more intuitive names.
For transforming the user names (previously
hook_auth_transform()), I suggesthook_cas_name_alter(). This then allows us to run the hook by simply callingdrupal_alter('cas_name', $cas_name).For allowing/denying access based upon user name, I suggest
hook_cas_name_allowed(). (This name I'm not too thrilled with .. hook_cas_name_filter() didn't seem much better.... definitely open to suggestions here).Also I've added a cas.api.php file which demonstrates the hooks, and added a note in the README about how the hooks were renamed.
Comment #5
metzlerd commentedI like the first, but not the auth_filter rename. Ultimately this filter is there to filter the user. As we move forward in implementation, it might be better to change this one to create a user object that we add some kind of way to say---- nope don't allow this person and wrap it up with the altering of user identitities. If we're going to get to removing authmap, we need to rethink this. Now we have at least 3 different issues that talk about refactoring hooks. I think we need to pick one and have the discussion there.
Comment #6
bfroehle commentedLet's move the discussion to #1059942: Refactor Hooks .