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
|
* Service instance name when selecting content_type
|
||||||
|
|
||||||
* Address.forward mailbbox validate not available on mailboxes
|
* 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
|
@transaction.atomic
|
||||||
@action_with_confirmation()
|
@action_with_confirmation()
|
||||||
def mark_as_executed(modeladmin, request, queryset, extra_context={}):
|
def mark_as_executed(modeladmin, request, queryset):
|
||||||
for trans in queryset:
|
for trans in queryset:
|
||||||
trans.mark_as_executed()
|
trans.mark_as_executed()
|
||||||
modeladmin.log_change(request, trans, _("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.apps.accounts.admin import SelectAccountAdminMixin
|
||||||
from orchestra.forms import UserCreationForm, UserChangeForm
|
from orchestra.forms import UserCreationForm, UserChangeForm
|
||||||
|
|
||||||
|
from .actions import grant_permission
|
||||||
from .filters import IsMainListFilter
|
from .filters import IsMainListFilter
|
||||||
from .models import SystemUser
|
from .models import SystemUser
|
||||||
|
|
||||||
|
@ -42,6 +43,8 @@ class SystemUserAdmin(ChangePasswordAdminMixin, SelectAccountAdminMixin, Extende
|
||||||
add_form = UserCreationForm
|
add_form = UserCreationForm
|
||||||
form = UserChangeForm
|
form = UserChangeForm
|
||||||
ordering = ('-id',)
|
ordering = ('-id',)
|
||||||
|
actions = (grant_permission,)
|
||||||
|
change_view_actions = actions
|
||||||
|
|
||||||
def display_active(self, user):
|
def display_active(self, user):
|
||||||
return user.active
|
return user.active
|
||||||
|
|
|
@ -37,7 +37,7 @@ class WebAppServiceMixin(object):
|
||||||
value = "%s" % opt.value
|
value = "%s" % opt.value
|
||||||
init_vars.append((name, value))
|
init_vars.append((name, value))
|
||||||
enabled_functions = []
|
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(',')
|
enabled_functions += enabled_functions.get().value.split(',')
|
||||||
if enabled_functions:
|
if enabled_functions:
|
||||||
disabled_functions = []
|
disabled_functions = []
|
||||||
|
|
Loading…
Reference in New Issue