diff options
author | Yorhel <git@yorhel.nl> | 2011-04-30 16:50:28 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-04-30 16:50:28 +0200 |
commit | 57b464e826e5f24828dec9401b70baaa43410b6c (patch) | |
tree | d5422908ec4d325a7ce9a0131321b74c6ee7e9c3 /lib/VNDB/Util | |
parent | 76b970a49e1d6374a3ec351debcf846ee00b78c0 (diff) |
Cleaned up permissions
- Removed 'hist' and 'mod', weren't used at all
- Merged 'del' and 'lock' into a single 'dbmod'
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r-- | lib/VNDB/Util/CommonHTML.pm | 6 | ||||
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index e1765d0d..5f2fb330 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -72,8 +72,8 @@ sub htmlMainTabs { } if( $type eq 'u' && ($self->authInfo->{id} && $obj->{id} == $self->authInfo->{id} || $self->authCan('usermod')) - || $type =~ /[vrp]/ && $self->authCan('edit') && (!$obj->{locked} || $self->authCan('lock')) && (!$obj->{hidden} || $self->authCan('del')) - || $type eq 'c' && $self->authCan('charedit') && (!$obj->{locked} || $self->authCan('lock')) && (!$obj->{hidden} || $self->authCan('del')) + || $type =~ /[vrp]/ && $self->authCan('edit') && ((!$obj->{locked} && !$obj->{hidden}) || $self->authCan('dbmod')) + || $type eq 'c' && $self->authCan('charedit') && ((!$obj->{locked} && !$obj->{hidden}) || $self->authCan('dbmod')) || $type =~ /[gi]/ && $self->authCan('tagmod') ) { li $sel eq 'edit' ? (class => 'tabselected') : (); @@ -143,7 +143,7 @@ sub htmlHiddenMessage { end; end; end 'div'; - return $self->htmlFooter() || 1 if !$self->authCan('del'); + return $self->htmlFooter() || 1 if !$self->authCan('dbmod'); return 0; } diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index 68b6a101..805467f6 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -214,15 +214,11 @@ sub htmlForm { fieldset class => 'submit'; if($options->{editsum}) { # hidden / locked checkbox - if($self->authCan('del')) { + if($self->authCan('dbmod')) { input type => 'checkbox', name => 'ihid', id => 'ihid', value => 1, $options->{frm}{ihid} ? (checked => 'checked') : (); label for => 'ihid', mt '_form_ihid'; - } - if($self->authCan('lock')) { input type => 'checkbox', name => 'ilock', id => 'ilock', value => 1, $options->{frm}{ilock} ? (checked => 'checked') : (); label for => 'ilock', mt '_form_ilock'; - } - if($self->authCan('lock') || $self->authCan('del')) { br; txt mt('_form_hidlock_note'); br; } |