Commit Graph

91 Commits

Author SHA1 Message Date
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
Bharat Mediratta
c936eebcf7 Don't do graphics detection in core_installer::install() because that
gets run at scaffolding::package() time, not on the target machine.
Instead, create a core module variable to trigger running
graphics::choose_default_toolkit() on the first admin login after install.

Fixes ticket #206.
2009-04-05 20:43:05 +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
a04fe5246c Fix the locale field in the change user settings form 2009-03-17 17:19:45 +00:00
Andy Staudacher
ee2f09c968 Fix edit user form handler 2009-03-17 15:49:02 +00:00
Bharat Mediratta
c15e4c61a3 Proxy the url through _auth() to user::get_login_form() 2009-03-16 08:05:44 +00:00
Bharat Mediratta
736d74d05f Clean up the login, maintenance login and required-top-level-login code.
We now have two clear and separate login approaches:
  login/ajax
  login/html

Choose the one that's appropriate.  Totally simplified the maintenance
page to be separate from the theme and dead simple, and use login/html
approach there.  Totally simplified the top level login
(login_page.html.php) to just be a login page, not the rest of the
chrome on the page and use the login/ajax approach there.

Don't use access::required in albums and then catch the exception,
instead use access::can and check the return code.

Improve the text for maintenance mode.
2009-03-16 04:33:45 +00:00
Tim Almdal
e58b955d4a Bag the header("Location:", ...);exit() and replace with
url:site(url::abs_file(...))
Create a login_page.html to be used when there is no guest access to
the root album. It doesn't have a sidebar nor breadcrumb.
2009-03-11 21:07:21 +00:00
Tim Almdal
a521d9177f Force a login if everybody does not have access to the root
item. ticket #118.
2009-03-11 13:58:38 +00:00
Andy Staudacher
62f3724acb Adding UI for site language selection and user language preference. 2009-02-10 05:37:42 +00:00
Bharat Mediratta
06d5e2972d Line length fix 2009-02-10 04:56:21 +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
f0aced6b75 Complete the Recover Password functionality (Ticket #5).
This change requires a reinstall in order to pick up the new hash
field in the user table.
2009-02-04 15:45:48 +00:00
Tim Almdal
2f5344c1da A preview of the password reset functionality. What's working... you
can start to logon, request the password to be reset, and an email is
sent to the users email address.  If you click on the link you get an
unformatted form.  But its a start :-)
2009-02-04 05:49:29 +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
Tim Almdal
a8233ed979 Undo the adding underscores to the id on forge generated forms 2009-01-25 06:28:04 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +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
Bharat Mediratta
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +00:00
Bharat Mediratta
a7feeb576f Big set of changes to comments, with related changes to akismet and
user modules.

* Don't delete vars when we delete a module.  This makes
  reinstalling a module a lot easier.

* Add user::lookup() as the preferred way to load a user, so that
  other modules don't delve into the user module (that'd be a
  problem when we swap out user modules)

* Notify site admins if Akismet is not fully configured

* Bundle all server variables into the comment so that if/when we
  re-check the comment, we are not using the server info from the
  site admin's request.

* Update Akismet to grab request context data from the comment

* Pre-seed comment fields if we have a logged in user.  Update
  comment::create() API to clarify it for this.

* Delete comment::update(), that's a controller function.

* Add url to User_Model

* Add author_name() author_email() and author_url() to
  Comment_Model.  It'll return the appropriate values depending
  on whether the comment was left by a logged in user or a guest.

* Use resetForm() instead of clearForm() when we reload the
  comment form after ajax submit, this way we preserve the
  pre-seeded values.

* In the user profile page, ignore blank passwords.
2009-01-10 00:34:23 +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
fd3db57778 Add a submit button to the login form 2009-01-06 08:34:07 +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
6b1fa62173 Added content type to JSON output functions 2008-12-26 20:08:15 +00:00
Felix Rabinovich
6dcc3e5c25 User/Group administration cleanup 2008-12-26 06:14:24 +00:00
Felix Rabinovich
2917af5c0d Separate GET and POST in Group Administration 2008-12-26 05:45:09 +00:00
Felix Rabinovich
72c3a417ca Separate GET and POST in User Administration 2008-12-26 05:26:22 +00:00
Bharat Mediratta
b5e1aa6a60 Login is 'info' not 'success' 2008-12-26 05:11:42 +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
Felix Rabinovich
82ed38d78e Ajaxify 'add users' 2008-12-25 20:59:33 +00:00
Felix Rabinovich
730d74c87a fixes in user edit and delete 2008-12-25 06:29:12 +00:00
Felix Rabinovich
3a22e0a2df fixed minor log:add typo 2008-12-25 06:11:07 +00:00
Bharat Mediratta
d4a5264925 get_add_form() -> add_add_form_admin() 2008-12-25 05:57:45 +00:00
Bharat Mediratta
fdc0f83024 Big round of normalization of the way that our controllers
communicate.  Almost all controllers now use JSON to speak to the
theme when we're dealing with form processing.  This means tht we only
send the form back and forth, but we use a JSON protocol to tell the
browser success/error status as well as the location of any newly
created resources, or where the browser should redirect the user.

Lots of small changes:
1) Admin -> Edit Profile is gone.  Instead I fixed the "Modify Profile" link
   in the top right corner to be a modal dialog

2) We use json_encode everywhere.  No more Atom/XML for now.  We can bring those
   back later, though.  For now there's a lot of code duplication but that'll be
   easy to clean up.

3) REST_Controller is no longer abstract.   All methods its subclasses should create
   throw exceptions, which means that subclasses don't have to implement stubs for
   those methods.

4) New pattern: helper method get_add_form calls take an Item_Model,
   not an id since we have to load the Item_Model in the controller
   anyway to check permissions.

5) User/Groups REST resources are separate from User/Group in the site
   admin.  They do different things, we should avoid confusing overlap.
2008-12-25 05:12:46 +00:00
Bharat Mediratta
2c6a80fb76 Don't let the admin delete themselves, either. That would be bad. 2008-12-25 02:48:07 +00:00
Bharat Mediratta
95ec6a8f57 Only admins can delete users. 2008-12-25 02:47:17 +00:00
Bharat Mediratta
216ecf3079 Fix rules for editing users. 2008-12-25 02:42:48 +00:00
Bharat Mediratta
f6ebb436e4 Rest_Controller -> REST_Controller everywhere, for consistency. 2008-12-25 02:38:53 +00:00