|
@@
-61,62
+61,63
b' class PermissionModel(BaseModel):'
|
|
61
|
'default_user_group_perm': None,
|
|
61
|
'default_user_group_perm': None,
|
|
62
|
}
|
|
62
|
}
|
|
63
|
|
|
63
|
|
|
64
|
def set_global_permission_choices(self, c_obj, translator):
|
|
64
|
def set_global_permission_choices(self, c_obj, gettext_translator):
|
|
|
|
|
65
|
|
|
65
|
c_obj.repo_perms_choices = [
|
|
66
|
c_obj.repo_perms_choices = [
|
|
66
|
('repository.none', translator('None'),),
|
|
67
|
('repository.none', gettext_translator('None'),),
|
|
67
|
('repository.read', translator('Read'),),
|
|
68
|
('repository.read', gettext_translator('Read'),),
|
|
68
|
('repository.write', translator('Write'),),
|
|
69
|
('repository.write', gettext_translator('Write'),),
|
|
69
|
('repository.admin', translator('Admin'),)]
|
|
70
|
('repository.admin', gettext_translator('Admin'),)]
|
|
70
|
|
|
71
|
|
|
71
|
c_obj.group_perms_choices = [
|
|
72
|
c_obj.group_perms_choices = [
|
|
72
|
('group.none', translator('None'),),
|
|
73
|
('group.none', gettext_translator('None'),),
|
|
73
|
('group.read', translator('Read'),),
|
|
74
|
('group.read', gettext_translator('Read'),),
|
|
74
|
('group.write', translator('Write'),),
|
|
75
|
('group.write', gettext_translator('Write'),),
|
|
75
|
('group.admin', translator('Admin'),)]
|
|
76
|
('group.admin', gettext_translator('Admin'),)]
|
|
76
|
|
|
77
|
|
|
77
|
c_obj.user_group_perms_choices = [
|
|
78
|
c_obj.user_group_perms_choices = [
|
|
78
|
('usergroup.none', translator('None'),),
|
|
79
|
('usergroup.none', gettext_translator('None'),),
|
|
79
|
('usergroup.read', translator('Read'),),
|
|
80
|
('usergroup.read', gettext_translator('Read'),),
|
|
80
|
('usergroup.write', translator('Write'),),
|
|
81
|
('usergroup.write', gettext_translator('Write'),),
|
|
81
|
('usergroup.admin', translator('Admin'),)]
|
|
82
|
('usergroup.admin', gettext_translator('Admin'),)]
|
|
82
|
|
|
83
|
|
|
83
|
c_obj.register_choices = [
|
|
84
|
c_obj.register_choices = [
|
|
84
|
('hg.register.none', translator('Disabled')),
|
|
85
|
('hg.register.none', gettext_translator('Disabled')),
|
|
85
|
('hg.register.manual_activate', translator('Allowed with manual account activation')),
|
|
86
|
('hg.register.manual_activate', gettext_translator('Allowed with manual account activation')),
|
|
86
|
('hg.register.auto_activate', translator('Allowed with automatic account activation')),]
|
|
87
|
('hg.register.auto_activate', gettext_translator('Allowed with automatic account activation')),]
|
|
87
|
|
|
88
|
|
|
88
|
c_obj.password_reset_choices = [
|
|
89
|
c_obj.password_reset_choices = [
|
|
89
|
('hg.password_reset.enabled', translator('Allow password recovery')),
|
|
90
|
('hg.password_reset.enabled', gettext_translator('Allow password recovery')),
|
|
90
|
('hg.password_reset.hidden', translator('Hide password recovery link')),
|
|
91
|
('hg.password_reset.hidden', gettext_translator('Hide password recovery link')),
|
|
91
|
('hg.password_reset.disabled', translator('Disable password recovery')),]
|
|
92
|
('hg.password_reset.disabled', gettext_translator('Disable password recovery')),]
|
|
92
|
|
|
93
|
|
|
93
|
c_obj.extern_activate_choices = [
|
|
94
|
c_obj.extern_activate_choices = [
|
|
94
|
('hg.extern_activate.manual', translator('Manual activation of external account')),
|
|
95
|
('hg.extern_activate.manual', gettext_translator('Manual activation of external account')),
|
|
95
|
('hg.extern_activate.auto', translator('Automatic activation of external account')),]
|
|
96
|
('hg.extern_activate.auto', gettext_translator('Automatic activation of external account')),]
|
|
96
|
|
|
97
|
|
|
97
|
c_obj.repo_create_choices = [
|
|
98
|
c_obj.repo_create_choices = [
|
|
98
|
('hg.create.none', translator('Disabled')),
|
|
99
|
('hg.create.none', gettext_translator('Disabled')),
|
|
99
|
('hg.create.repository', translator('Enabled'))]
|
|
100
|
('hg.create.repository', gettext_translator('Enabled'))]
|
|
100
|
|
|
101
|
|
|
101
|
c_obj.repo_create_on_write_choices = [
|
|
102
|
c_obj.repo_create_on_write_choices = [
|
|
102
|
('hg.create.write_on_repogroup.false', translator('Disabled')),
|
|
103
|
('hg.create.write_on_repogroup.false', gettext_translator('Disabled')),
|
|
103
|
('hg.create.write_on_repogroup.true', translator('Enabled'))]
|
|
104
|
('hg.create.write_on_repogroup.true', gettext_translator('Enabled'))]
|
|
104
|
|
|
105
|
|
|
105
|
c_obj.user_group_create_choices = [
|
|
106
|
c_obj.user_group_create_choices = [
|
|
106
|
('hg.usergroup.create.false', translator('Disabled')),
|
|
107
|
('hg.usergroup.create.false', gettext_translator('Disabled')),
|
|
107
|
('hg.usergroup.create.true', translator('Enabled'))]
|
|
108
|
('hg.usergroup.create.true', gettext_translator('Enabled'))]
|
|
108
|
|
|
109
|
|
|
109
|
c_obj.repo_group_create_choices = [
|
|
110
|
c_obj.repo_group_create_choices = [
|
|
110
|
('hg.repogroup.create.false', translator('Disabled')),
|
|
111
|
('hg.repogroup.create.false', gettext_translator('Disabled')),
|
|
111
|
('hg.repogroup.create.true', translator('Enabled'))]
|
|
112
|
('hg.repogroup.create.true', gettext_translator('Enabled'))]
|
|
112
|
|
|
113
|
|
|
113
|
c_obj.fork_choices = [
|
|
114
|
c_obj.fork_choices = [
|
|
114
|
('hg.fork.none', translator('Disabled')),
|
|
115
|
('hg.fork.none', gettext_translator('Disabled')),
|
|
115
|
('hg.fork.repository', translator('Enabled'))]
|
|
116
|
('hg.fork.repository', gettext_translator('Enabled'))]
|
|
116
|
|
|
117
|
|
|
117
|
c_obj.inherit_default_permission_choices = [
|
|
118
|
c_obj.inherit_default_permission_choices = [
|
|
118
|
('hg.inherit_default_perms.false', translator('Disabled')),
|
|
119
|
('hg.inherit_default_perms.false', gettext_translator('Disabled')),
|
|
119
|
('hg.inherit_default_perms.true', translator('Enabled'))]
|
|
120
|
('hg.inherit_default_perms.true', gettext_translator('Enabled'))]
|
|
120
|
|
|
121
|
|
|
121
|
def get_default_perms(self, object_perms, suffix):
|
|
122
|
def get_default_perms(self, object_perms, suffix):
|
|
122
|
defaults = {}
|
|
123
|
defaults = {}
|