GroupSecurity.pm 1.46 KB
Newer Older
1 2 3
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
#
5 6
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
7 8 9 10 11 12

package Bugzilla::Config::GroupSecurity;

use strict;

use Bugzilla::Config::Common;
13
use Bugzilla::Group;
14

15
our $sortkey = 900;
16 17 18

sub get_param_list {
  my $class = shift;
19

20 21 22 23 24 25 26 27 28
  my @param_list = (
  {
   name => 'makeproductgroups',
   type => 'b',
   default => 0
  },

  {
   name => 'chartgroup',
29
   type => 's',
30
   choices => \&_get_all_group_names,
31 32
   default => 'editbugs',
   checker => \&check_group
33
  },
34

35 36
  {
   name => 'insidergroup',
37
   type => 's',
38
   choices => \&_get_all_group_names,
39 40
   default => '',
   checker => \&check_group
41 42 43 44
  },

  {
   name => 'timetrackinggroup',
45
   type => 's',
46
   choices => \&_get_all_group_names,
47 48
   default => 'editbugs',
   checker => \&check_group
49
  },
50

51 52 53 54 55 56 57 58
  {
   name => 'querysharegroup',
   type => 's',
   choices => \&_get_all_group_names,
   default => 'editbugs',
   checker => \&check_group
  },
  
59 60 61 62
  {
   name => 'usevisibilitygroups',
   type => 'b',
   default => 0
63 64 65 66 67 68
  }, 
  
  {
   name => 'strict_isolation',
   type => 'b',
   default => 0
69 70 71 72
  } );
  return @param_list;
}

73
sub _get_all_group_names {
74
    my @group_names = map {$_->name} Bugzilla::Group->get_all;
75
    unshift(@group_names, '');
76 77
    return \@group_names;
}
78
1;