Parent Directory | Revision Log
very crude brain dump of various changes: - introduce command ACL in Arh::DefaultACL which allmost all modes use - rewrite most templates and implement crude hack Arch::Web::Material to render special type of form to add singe material - version bump [0.02]
1 | dpavlin | 13 | package Arh::DefaultACL; |
2 | use Exporter 'import'; | ||
3 | our @EXPORT = qw/ | ||
4 | current_user_can | ||
5 | /; | ||
6 | |||
7 | use strict; | ||
8 | use warnings; | ||
9 | |||
10 | sub current_user_can { | ||
11 | my ( $self,$action,$item,$value ) = @_; | ||
12 | $item ||= ''; | ||
13 | $value ||= ''; | ||
14 | # Jifty->log->debug("|$action|$item|$value| user id: ",$self->current_user->id); | ||
15 | # return 0 if $self->current_user->id == 0 && $action ne 'read'; | ||
16 | return 1 if $self->current_user->superuser; | ||
17 | return 1 if $self->current_user->administrator; | ||
18 | return 1 if $action eq 'read' && $self->current_user->id > 0; | ||
19 | return 0; | ||
20 | } | ||
21 | |||
22 |
ViewVC Help | |
Powered by ViewVC 1.1.26 |