Commit Graph

60 Commits

Author SHA1 Message Date
Tim Almdal
0a6b540092 Merge branch 'master' into talmdal_dev
Conflicts:
	modules/server_add/helpers/server_add_theme.php
2009-10-24 07:28:22 -07:00
Chad Kieffer
3814186592 Created user.css. Moved user-related form css to the new sheet. 2009-10-23 22:25:36 -06:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
bc241e44c2 Cleanup merge of user/group helpers into Identity interface. Reduce redundant code in the user module and remove references to the Identity helper from the user module as the user module should be able to access things directly. Simplify the get_user_list api method to just accept an array of ids to return user objects for. 2009-10-16 08:55:26 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Tim Almdal
be6765336e Finish integrating the move of the user edit/update functions into the user module. The premise is that the plugable user module will provide the update screens if the user backend supports updates. 2009-10-16 08:53:30 -07:00
Tim Almdal
7e4c0e7135 Merge branch 'master' into talmdal_dev 2009-10-15 09:05:44 -07:00
Tim Almdal
f5dd8d487e Move all the edit/update forms for users and groups back to the user module. 2009-10-15 08:56:31 -07:00
Tim Almdal
1ca835cea7 Merge branch 'master' into talmdal_dev 2009-10-15 07:58:46 -07:00
Tim Almdal
0d5d4c81bc Move the ui for user adminsitration back to the user module. 2009-10-14 21:20:30 -07:00
Tim Almdal
2af4806011 Refactor the ui component of the user module into the gallery core module. 2009-10-13 13:19:17 -07:00
Tim Almdal
00ee91837f Convert direct lookups for the user table using ORM to using the user::lookup_by_name and user_lookup API methods.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
(cherry picked from commit 194cc3b27a)
Create the get_user_list, lookup_by_name, lookup_by_hash and get_group_list api functions
2009-10-09 01:26:35 -07:00
Tim Almdal
7f38d6ff29 Change the focus of the user module from providing user/group management to providing the default Identity implementation.
* Remove the user_event callbacks and move them to the gallery_event callbacks. This will insure that the active user is always loaded (because the gallery callbacks are always called first) to its available to other gallery_ready handlers.  Moved the method set_request_locale to the locales helper as it is more related to locales.
* Move the user controllers and views into the gallery module.
* Move the theme and block processing out of the user module and into core.
2009-10-06 18:30:12 -07:00
Tim Almdal
8285cd58e2 Handle the filters on Identity/Gallery::list_users and Identity/Gallery::list_groups 2009-10-05 18:10:39 -07:00
Tim Almdal
194cc3b27a First pass on converting calls to the Identity interface. Will worry about writes and saves later.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
2009-10-05 16:28:16 -07:00
Andy Staudacher
e168e0dfae CSRF / auth fixes, golden data file checkpoint 2009-09-15 21:50:48 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Bharat Mediratta
67d4ae21d5 Clean up user form events. Thanks to Ben Smith (glooper). 2009-07-29 17:43:12 -07:00
Tim Almdal
00cd2b646d fix for ticket #574. The user->url database wasn't being set when the user was updated via the admin panel. 2009-07-25 15:00:57 -07:00
Bharat Mediratta
1fbdf1a1e0 Add form processing events:
user_add_form_admin            admin adding a user
 user_edit_form_admin           admin editing a user
 user_add_form_admin_completed  successfully added a user (admin)
 user_edit_form                 user editing their own settings
 user_edit_form_completed       successfully edited a user (admin and user editing own settings)
2009-07-23 10:35:52 -07:00
Bharat Mediratta
8f9a943f55 Fix a bunch of XSS vulnerabilities turned up by manual inspection
using the checklist in ticket #385.
2009-07-01 17:57:39 -07:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -07:00
Chad Kieffer
916405bc4b White space fixes 2009-05-26 01:53:18 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
dcdc6f1e77 Don't allow admins to delete the guest user. Fixes ticket #213 2009-05-13 04:01:38 +00:00
Bharat Mediratta
9c24b5d94d Variety of changes to the way we do user editing:
1) Allow admins to edit the admin bit of other admins
2) Don't allow admins to delete themselves (partial fix for ticket #213)
3) Inline user::update().  Don't do form processing in helper methods!
4) Inline user::_get_edit_form() so that we can treat edit forms differently.
   Trying to hard to make common functions makes for weird edge cases.
2009-05-13 03:56:50 +00:00
Bharat Mediratta
cda6e54aa4 add_group() was not getting $form before using it. 2009-04-24 00:33:27 +00:00
Andy Staudacher
d558a88015 Fix for ticket 181: don't ignore the locale option when adding users 2009-04-09 02:41:29 +00:00
Tim Almdal
9ed0dd51bf Fix for ticket #201.
1) create common update function so processing consistent between the
user edit and admin edit.
2) created common private helper function to build the user edit form
the same way.
So a user can now change their user name if the new one doesn't exist.
2009-04-03 17:33:07 +00:00
Tim Almdal
3cb2c42e49 Fix for ticket #181. Valiant take note of the change to
admin_users.php.  I had to remove the check for the locale as it
hasn't been added to the form.
2009-03-25 16:21:36 +00:00
Andy Staudacher
62f3724acb Adding UI for site language selection and user language preference. 2009-02-10 05:37:42 +00:00
Tim Almdal
98bbf53657 Use the matches validation rule in order to perform cross field
validation between the password and password2 fields
2009-02-04 16:36:59 +00:00
Tim Almdal
eb56ee821f Add a confirmation password input field that must match the primary
password field in order for the update to succeed.  If there is no
data entered in the primary password field, the confirmation field is
ignored.

Addresses Trac Ticket #4
2009-02-03 00:17:40 +00:00
Bharat Mediratta
6091350c94 Fix lint errors 2009-01-29 03:23:46 +00:00
Bharat Mediratta
6bfadc14ed Fully implement the user administration backend with drag/drop to add
users to groups.
2009-01-28 22:42:50 +00:00
Bharat Mediratta
1a62a26a36 Add drag and drop support to the admin_users interface. This is still
a work in progress but it actually works mostly.
2009-01-28 09:50:15 +00:00
Jakob Hilden
1cc5d36657 toggling of user edit panel works now.
added groups to the admin_user view, so you will eventually be able to edit users, groups and memberships on one admin page.
2009-01-22 08:37:58 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
4ee24a6645 Put up an error if you rename a user to an already existing name. 2009-01-06 10:05:08 +00:00
Bharat Mediratta
6ab195854d Remove rest::JSON content type; it's causing lots of problems and it doesn't directly help since text/html works just as well for our JSON communications 2008-12-29 22:41:53 +00:00
Felix Rabinovich
6dcc3e5c25 User/Group administration cleanup 2008-12-26 06:14:24 +00:00
Felix Rabinovich
72c3a417ca Separate GET and POST in User Administration 2008-12-26 05:26:22 +00:00
Felix Rabinovich
c154f9f20a Group Administration 2008-12-26 04:35:27 +00:00
Felix Rabinovich
314d55d858 User Administration. Add users. Take 3 2008-12-26 03:47:04 +00:00
Felix Rabinovich
9a71309844 User Administration. Delete users. Take 3 2008-12-26 03:22:52 +00:00
Felix Rabinovich
7f95c80e88 User Administration. Edit users. Take 3 2008-12-26 00:58:15 +00:00
Bharat Mediratta
2c91a7e9ce Rework log and message helpers to be parallel, but separate.
1) they now have their own matching severity constants
2) they both have convenience functions success(), info(), warning() and error()
3) they both have severity_class()
2008-12-25 23:43:44 +00:00
Bharat Mediratta
71d0373838 Return the form on success so that we clear out any prior error forms 2008-12-25 21:41:18 +00:00