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
093fb407a8
Fix a bug where setting the active user did not reset group_ids (unit tests ftw!)
2008-12-17 19:23:04 +00:00
Bharat Mediratta
fa5a8fde4a
Switch from cookie sessions to database sessions. We can't use cookie
...
sessions; it encodes all the value into the cookie which means
little/no security, transfer costs, and storage limits.
2008-12-17 18:32:08 +00:00
Bharat Mediratta
130e26983a
Add initialization to the user module to put the user and group_ids
...
into the session, for easy access. This cuts down the number of
queries when we're loading images through file_proxy.php
2008-12-17 17:40:45 +00:00
Bharat Mediratta
d9e02a5d0c
Various optimizations:
...
o Add model_cache::get() which caches models avoiding duplicate lookups
o Stop using ORM relationships for Item_Model::owner so that we can use caching
o For Item_Model::xxx_edit fields, don't make them editable for guests
o Other minor stuff.
These optimizations reduce the number of queries for a 9-photos page from ~200
to ~45. Still way too many!
2008-12-16 04:29:00 +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
8b3989b063
Add user::guest() convenience function
2008-12-12 06:54:13 +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
f69f3967ea
move user::delete() to User_Model::delete()
2008-12-09 00:07:26 +00:00
Bharat Mediratta
8b6ed6c477
Create module::event() which runs Gallery events. It works by
...
convention. To respond to the "photo_created" event in the gmaps
module, you create modules/gmaps/helpers/gmaps_event.php containing
class gmaps_event which has function photo_created.
Renamed all events from gallery.foo.bar to foo_bar
Updated tag module to use new convention.
2008-11-28 19:37:01 +00:00
Tim Almdal
828f23896f
Rename item events and create events for comment create, login, logout, user creation. I probably forgot some, but its a start.
2008-11-28 00:51:38 +00:00
Bharat Mediratta
8d4bd0c814
Update tests to reflect the fact that the admin group is gone.
...
Fix a bug in user::create(), found by the unit tests (hooray)!
2008-11-27 19:46:39 +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
5fce343ca4
Create user/group create/delete functions and have the scaffolding use them.
2008-11-26 03:34:39 +00:00
Jozef Selesi
3ebb751cda
First iteration of REST controller refactoring. RESTful controllers that refer to collections should now have plural names and there should be only one controller per resource. Updated existing classes that implement REST_Controller. The routing now works like this:
...
GET /controller -> controller::_index()
POST /controller -> controller::_create()
GET /controller/id -> controller::_show()
PUT /controller/id -> controller::_update()
DELETE /controller/id -> controller::_delete()
GET /form/edit/controller/resource_id -> controller::_form()
GET /form/add/controller/data -> controller::_form()
2008-11-18 08:28:32 +00:00
Bharat Mediratta
0975e702a9
Add _method=put to the edit form
...
Properly implement User_Controller::_put()
2008-11-16 19:26:44 +00:00
Bharat Mediratta
4610fc8e7f
Create Forge::add_rules_from() which pulls validation rules from the model and
...
associates them with the form. This replaces the various _add_validation_rules()
functions in the user and comment modules.
Move user edit form into user helper for consistency with the comment module.
Implement missing _form method in the user controller.
2008-11-16 07:51:42 +00:00
Tim Almdal
f62719ba61
Login is now working, but you can't logout
2008-11-13 04:56:12 +00:00
Tim Almdal
2019e9a931
Remove user_password class and move the functionality into the user helper class
2008-11-12 15:53:39 +00:00
Tim Almdal
dd9058ada4
Added some functionality to the user helper class (to check if the user is logged in) and changed the header to use the helper class
2008-11-11 20:16:58 +00:00
Tim Almdal
f5d092b484
Correct some missing properties and change the user_model to have a set function so the password is hashed as part of the model
2008-11-11 20:02:43 +00:00