Revision dd97f9fc
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/Controller/Draft.pm | ||
---|---|---|
132 | 132 |
sub draft_list { |
133 | 133 |
my ($self) = @_; |
134 | 134 |
|
135 |
my $result = selectall_hashref_query($::form, $::form->get_standard_dbh, <<SQL, $self->module, $self->submodule, SL::DB::Manager::Employee->current->id); |
|
135 |
if ($::auth->assert('all_drafts_edit', 1)) { |
|
136 |
my $result = selectall_hashref_query($::form, $::form->get_standard_dbh, <<SQL, $self->module, $self->submodule); |
|
137 |
SELECT d.*, date(d.itime) AS date |
|
138 |
FROM drafts d |
|
139 |
WHERE (d.module = ?) |
|
140 |
AND (d.submodule = ?) |
|
141 |
ORDER BY d.itime |
|
142 |
SQL |
|
143 |
} else { |
|
144 |
my $result = selectall_hashref_query($::form, $::form->get_standard_dbh, <<SQL, $self->module, $self->submodule, SL::DB::Manager::Employee->current->id); |
|
136 | 145 |
SELECT d.*, date(d.itime) AS date |
137 | 146 |
FROM drafts d |
138 | 147 |
WHERE (d.module = ?) |
... | ... | |
140 | 149 |
AND (d.employee_id = ?) |
141 | 150 |
ORDER BY d.itime |
142 | 151 |
SQL |
152 |
} |
|
143 | 153 |
} |
144 | 154 |
|
145 | 155 |
sub dialog_html { |
locale/de/all | ||
---|---|---|
1106 | 1106 |
'Edit Warehouse' => 'Lager bearbeiten', |
1107 | 1107 |
'Edit acceptance status' => 'Abnahmestatus bearbeiten', |
1108 | 1108 |
'Edit additional articles' => 'Zusätzliche Artikel bearbeiten', |
1109 |
'Edit all drafts' => 'Entwürfe von allen Benutzern bearbeiten', |
|
1109 | 1110 |
'Edit article/section assignments' => 'Zuweisung Artikel/Abschnitte bearbeiten', |
1110 | 1111 |
'Edit assignment of articles to sections' => 'Zuweisung Artikel zu Abschnitten bearbeiten', |
1111 | 1112 |
'Edit background job' => 'Hintergrund-Job bearbeiten', |
sql/Pg-upgrade2-auth/all_drafts_edit.pl | ||
---|---|---|
1 |
# @tag: all_drafts_edit |
|
2 |
# @description: Zugriffsrecht auf alle Entwürfe |
|
3 |
# @depends: release_3_4_0 |
|
4 |
# @locales: Edit all drafts |
|
5 |
# @ignore: 0 |
|
6 |
package SL::DBUpgrade2::Auth::all_drafts_edit; |
|
7 |
|
|
8 |
use strict; |
|
9 |
use utf8; |
|
10 |
|
|
11 |
use parent qw(SL::DBUpgrade2::Base); |
|
12 |
|
|
13 |
use SL::DBUtils; |
|
14 |
|
|
15 |
sub run { |
|
16 |
my ($self) = @_; |
|
17 |
|
|
18 |
$self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (?, ?, ?)", bind => $_) for |
|
19 |
[ 5000, 'all_drafts_edit', 'Edit all drafts' ]; |
|
20 |
|
|
21 |
my $groups = $main::auth->read_groups(); |
|
22 |
|
|
23 |
foreach my $group (values %{$groups}) { |
|
24 |
$group->{rights}->{all_drafts_edit} = $group->{rights}->{email_employee_readall}; |
|
25 |
$main::auth->save_group($group); |
|
26 |
} |
|
27 |
|
|
28 |
return 1; |
|
29 |
} # end run |
|
30 |
|
|
31 |
1; |
Auch abrufbar als: Unified diff
erledigt #246 Recht: Entwürfe von anderen Benutzern bearbeiten