serahi/serahi — Issue #9: New Security Model
Author: milad-hero
Created: 2011-12-13 12:59:57+00:00
State: open

Define & Integrate a new security model that:
+ requires least amount of duplication,
+ can be configured using an external file. possible syntax could look like this:

$access_level['modules']['admin'] = 'admin';
$access_level['controllers']['home.home'] = 'everyone';
$access_level['actions'][admin.userlist.edit'] = 'admin|self';

+ should block all access that has no security level defined for.
+ define function access('level'): boolean to get what access level was permitted through.
+ allow defining alternative redirect on fail 'registered#user/login'

possible access levels should at least contain:
+ admin, seller, customer, self, registered, unregistered (e.g. login, signup), everyone
+ self:field_name (self:seller_id), self:field_name@(post|get)