Amy's Devblog

A blog containing information on all my work/education projects.

Thursday, September 15, 2005

CMS User Id

I added a userId field to the UserData object in CMS and implemented it for each user model. In ActiveDirectoryUserModel, we use the objectGUID attribute of the user that is generated automatically by AD when a user is created. In HibernateUserModel, we use the primary key of the user in the users table. In Prevayler, we generate an ID whenever a user is created using a combination of the system time (in milliseconds) and an integer suffix to distinguish between any users who happen to be created at the same millisecond. I then modified the permissions code so that it uses the userId to store the permissions data rather than the user logon name. This way, the user's logon name can be changed without invalidating all the previously set permissions for the user.

0 Comments:

Post a Comment

<< Home