/[Arh]/lib/Arh/DefaultACL.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/Arh/DefaultACL.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13 - (hide annotations)
Fri Nov 30 00:03:15 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 530 byte(s)
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