GroupSecurity.pm 1.6 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 63 64 65 66
  {
   name => 'debug_group',
   type => 's',
   choices => \&_get_all_group_names,
   default => 'admin',
   checker => \&check_group
  },
  
67 68 69 70
  {
   name => 'usevisibilitygroups',
   type => 'b',
   default => 0
71 72 73 74 75 76
  }, 
  
  {
   name => 'strict_isolation',
   type => 'b',
   default => 0
77 78 79 80
  } );
  return @param_list;
}

81
sub _get_all_group_names {
82
    my @group_names = map {$_->name} Bugzilla::Group->get_all;
83
    unshift(@group_names, '');
84 85
    return \@group_names;
}
86
1;