Initial implementation of systemusers permissions
This commit is contained in:
parent
d422e109e9
commit
07e53d4b68
3
TODO.md
3
TODO.md
|
@ -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)
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue