Initial implementation of systemusers permissions

This commit is contained in:
Marc Aymerich 2014-11-11 16:59:13 +00:00
parent d422e109e9
commit 07e53d4b68
4 changed files with 8 additions and 2 deletions

View File

@ -213,3 +213,6 @@ Remember that, as always with QuerySets, any subsequent chained methods which im
* Service instance name when selecting content_type
* Address.forward mailbbox validate not available on mailboxes
* Miscellaneous service construct form for specific data, fields, validation, uniquenes.. etc (domain usecase)

View File

@ -53,7 +53,7 @@ def process_transactions(modeladmin, request, queryset):
@transaction.atomic
@action_with_confirmation()
def mark_as_executed(modeladmin, request, queryset, extra_context={}):
def mark_as_executed(modeladmin, request, queryset):
for trans in queryset:
trans.mark_as_executed()
modeladmin.log_change(request, trans, _("Executed"))

View File

@ -11,6 +11,7 @@ from orchestra.admin.utils import wrap_admin_view
from orchestra.apps.accounts.admin import SelectAccountAdminMixin
from orchestra.forms import UserCreationForm, UserChangeForm
from .actions import grant_permission
from .filters import IsMainListFilter
from .models import SystemUser
@ -42,6 +43,8 @@ class SystemUserAdmin(ChangePasswordAdminMixin, SelectAccountAdminMixin, Extende
add_form = UserCreationForm
form = UserChangeForm
ordering = ('-id',)
actions = (grant_permission,)
change_view_actions = actions
def display_active(self, user):
return user.active

View File

@ -37,7 +37,7 @@ class WebAppServiceMixin(object):
value = "%s" % opt.value
init_vars.append((name, value))
enabled_functions = []
for value in options.filter(name='enabled_functions').values_list('value', flat=True):
for value in options.filter(name='php-enabled_functions').values_list('value', flat=True):
enabled_functions += enabled_functions.get().value.split(',')
if enabled_functions:
disabled_functions = []