diff options
author | Yorhel <git@yorhel.nl> | 2015-11-01 10:24:43 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-11-01 10:37:30 +0100 |
commit | 4b1807a58912ff0b4542063071e072ccf53fd1bd (patch) | |
tree | d809d1c4348e963bdbd6e1003ad0fe11502e6c15 | |
parent | 21990745f46bc4536ab6ecf330e1a3a0ebe4e430 (diff) |
Remove deprecated 'staffedit' permission flag
-rw-r--r-- | data/global.pl | 4 | ||||
-rw-r--r-- | lib/VNDB/Handler/Staff.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 4 | ||||
-rw-r--r-- | util/updates/update_2.26.sql | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/data/global.pl b/data/global.pl index de810926..4fefee29 100644 --- a/data/global.pl +++ b/data/global.pl @@ -32,8 +32,8 @@ our %S; scr_size => [ 136, 102 ], # w*h of screenshot thumbnails ch_size => [ 256, 300 ], # max. w*h of char images cv_size => [ 256, 400 ], # max. w*h of cover images - # bit flags (Flag 8 was used for staffedit) - permissions => {qw| board 1 boardmod 2 edit 4 staffedit 4 tag 16 dbmod 32 tagmod 64 usermod 128 affiliate 256 |}, + # bit flags (Flag 8 was used for staffedit, now free to re-use) + permissions => {qw| board 1 boardmod 2 edit 4 tag 16 dbmod 32 tagmod 64 usermod 128 affiliate 256 |}, default_perm => 1+4+16, # Keep synchronised with the default value of users.perm default_tags_cat=> 'cont,tech', languages => [qw|ar ca cs da de en es fi fr he hu id it ja ko nl no pl pt-br pt-pt ro ru sk sv tr uk vi zh|], diff --git a/lib/VNDB/Handler/Staff.pm b/lib/VNDB/Handler/Staff.pm index 09d74930..0f878ca6 100644 --- a/lib/VNDB/Handler/Staff.pm +++ b/lib/VNDB/Handler/Staff.pm @@ -184,7 +184,7 @@ sub edit { return $self->resNotFound if $sid && !$s->{id}; $rev = undef if !$s || $s->{lastrev}; - return $self->htmlDenied if !$self->authCan('staffedit') + return $self->htmlDenied if !$self->authCan('edit') || $sid && (($s->{locked} || $s->{hidden}) && !$self->authCan('dbmod')); my %b4 = !$sid ? () : ( diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index e041960a..76b15690 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -104,9 +104,7 @@ sub _menu { if($self->authCan('edit')) { a href => '/v/add', mt '_menu_addvn'; br; a href => '/p/new', mt '_menu_addproducer'; br; - if($self->authCan('staffedit')) { - a href => '/s/new', mt '_menu_addstaff'; br; - } + a href => '/s/new', mt '_menu_addstaff'; br; a href => '/c/new', mt '_menu_addcharacter'; br; } br; diff --git a/util/updates/update_2.26.sql b/util/updates/update_2.26.sql new file mode 100644 index 00000000..5d1c403f --- /dev/null +++ b/util/updates/update_2.26.sql @@ -0,0 +1,2 @@ +-- No more 'staffedit' permission flag +UPDATE users SET perm = (perm & ~8); |