Commit Graph

68 Commits

Author SHA1 Message Date
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
7d98d4b7b9 Revert "Fix for ticket #491: Make user and group names translatable."
This reverts commit 4091219425.
2010-02-18 16:20:59 -08:00
Bharat Mediratta
99c131e845 Revert "Never assign a SafeString instance to a Model member (or hell will break loose)."
This reverts commit dcddc68f58.
2010-02-18 16:20:23 -08:00
Andy Staudacher
dcddc68f58 Never assign a SafeString instance to a Model member (or hell will break loose). 2010-02-15 13:12:38 -08:00
Andy Staudacher
4091219425 Fix for ticket #491: Make user and group names translatable.
Also fixed a UI bug: No longer showing the edit user buttons to admins in the profile view (to be consistent with the requirements in the controller).
2010-02-14 19:26:34 -08:00
Bharat Mediratta
e1bf010d89 Force all non-guest users to have an email address since that's
required in model validation.  Without this, any save on a user
without email will fail which means that you can't log in.

Bump user module to version 3.
2010-01-31 20:50:52 -08:00
Bharat Mediratta
b6dab323ac Use ORM to create the users since now our validation can handle doing
it the right way.  Set a default email address for admins.
2010-01-25 20:42:48 -08:00
Bharat Mediratta
fecac4a859 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/tests/xss_data.txt
2010-01-23 16:29:10 -08:00
Tim Almdal
df313cac56 Change the check_environment method in the module helper and the module installers to can_activate to reflect that it is doing more than just checking the environment. 2010-01-22 12:30:17 -08:00
Tim Almdal
ae568b6182 Refactor the identity provider installation in to a common helper method (change_provider) with an initialization callback. 2010-01-22 12:09:11 -08:00
Tim Almdal
603c3049a1 Treat identity providers just like other modules and use the admin_module to
install and switch to a different identity provider.
2010-01-22 09:39:29 -08:00
Bharat Mediratta
5162e35d49 Use an empty password for the guest user. 2010-01-17 17:54:14 -08:00
Bharat Mediratta
cfb27dde02 Adjust installers to work with model based validation. 2010-01-17 13:28:24 -08:00
Tim Almdal
abe42002b2 Don't specify the default identity provider in the gallery installer. Let the user module use that as a trigger to set ownership of the root album to the administrator. 2009-10-31 14:13:35 -07:00
Tim Almdal
156a99beef Set the minimum password length to 5. The gallery owner can change this in the advance settings. 2009-10-27 10:13:52 -07:00
Tim Almdal
274d4680fa Upgrade the gallery module to version 16 to reflect the refactoring of the user module into an identity provider. Change how we determine if there are available groups that we need to export 2009-10-26 10:05:25 -07:00
Tim Almdal
923a322ef5 Change the Admin_Identity_Controller to not destroy the session until after the new provider is installed. 2009-10-23 06:09:24 -07:00
Tim Almdal
b74b131e25 Change Identity adminstration to use the uninstall/install methods when changing providers. 2009-10-22 22:30:25 -07:00
Tim Almdal
21383dddc3 Make sure we set the active identity provider when the user module is installed. This is mostly for the unit_tests as when the gallery3 installer is used, the user module is activated by default. 2009-10-21 11:52:55 -07:00
Tim Almdal
7f9441c33d Changes to Identity interface to allow for multiple Identity providers. What I've tested to this point, is you can install a new provider, switch to it, login as administrator, uninstall the default user module, reinstall the user module, switch back to the user module and login. 2009-10-20 16:32:22 -07:00
Bharat Mediratta
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
068c44e201 access::allow/deny/reset functions will now throw an exception if you
don't pass in a Group_Model as the argument.  This prevents us from
setting permissions on the wrong group by accidentally passing in a
User_Model.
2009-03-10 20:34:32 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
bd15853708 This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
2009-02-27 21:07:18 +00:00
Tim Almdal
0b055835fd Remove commented code
Correct unbalanced brackets
2009-02-27 02:50:07 +00:00
Tim Almdal
acdc724fc8 Continue the journey of replacing raw sql with ORM or Database method
calls (Ticket #68)
2009-02-27 00:34:50 +00:00
Andy Staudacher
c2eee47465 Move site default_locale into DB (vars) and add a per user locale preference.
There's no UI to select the locale yet.
2009-02-10 02:37:16 +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
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +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
Bharat Mediratta
ad719b9b6f Fully implement the view_full permission. 2008-12-31 00:18:24 +00:00
Bharat Mediratta
f29aad03a6 Make some columns smaller so that multi-column keys don't exceed 1024
bytes on some systems.
2008-12-30 01:37:09 +00:00
Bharat Mediratta
6564007a9d Implement admin user editing. It's still very rough. Trying to
figure out how to share forms between user and admin editing.

Incremental improvement
2008-12-19 22:16:10 +00:00
Bharat Mediratta
b6363bcb03 Update to reflect changes in Kohana ORM relationship code.
Now you must call ORM::save() after ORM::add() and ORM::remove().
2008-12-15 20:49:05 +00:00
Bharat Mediratta
2cf3233f54 Get rid of all pseudo users and pseudo groups, while preserving all
other functionality.  This makes our user/group and access code
fully consistent.
2008-12-12 00:59:30 +00:00
Bharat Mediratta
e62103b8d9 Move code to delete users and add/remove users from groups into the
model.
2008-12-09 08:47:30 +00:00
Bharat Mediratta
91c4bda1ec Prototype access control model. There's much left to do, but it's a
working implementation.
2008-12-01 08:50:00 +00:00
Bharat Mediratta
e183901dc3 Give the admin user actual admin privileges 2008-11-27 11:43:11 +00:00
Bharat Mediratta
c95c17b133 Centralize logging around installing/uninstalling modules. 2008-11-27 09:45:26 +00:00
Bharat Mediratta
427dc7a0d1 Ignore errors from dropping view columns from the items table. 2008-11-26 09:34:31 +00:00
Bharat Mediratta
9c60566197 Add support for marking users as "admin" 2008-11-26 04:54:43 +00:00
Bharat Mediratta
226df2a8f8 Add support in the scaffolding for adding users to groups, adding and
removing users and groups.
2008-11-26 04:45:43 +00:00
Bharat Mediratta
5ccb050413 group::create() and group::delete() now manage the view_## columns in
the items table.

Convert installer over to using new creation API.
2008-11-26 04:13:57 +00:00
Bharat Mediratta
340a0d7117 Add a @todo to change user "joe" in the future. 2008-11-20 06:26:42 +00:00
Tim Almdal
8b6796fa5f Synchronize the model rules with the database definitions and vice-versa. 2008-11-18 00:38:36 +00:00
Felix Rabinovich
f27929e126 create a regular user and make scaffolding assign owner to logged in user 2008-11-16 05:46:42 +00:00
Bharat Mediratta
6fd7194544 Destroy the session on logout, don't just delete the user. 2008-11-15 21:47:21 +00:00