mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 22:40:16 +02:00
Added new permission.
This commit is contained in:
parent
f4eac57b0f
commit
39a77829db
@ -69,6 +69,7 @@ Special Permissions In Admin:
|
|||||||
auth | user | timer_management ( Access to create and remove timers)
|
auth | user | timer_management ( Access to create and remove timers)
|
||||||
auth | user | timer_view ( Access to timerboard to view timers)
|
auth | user | timer_view ( Access to timerboard to view timers)
|
||||||
auth | user | srp_management ( Allows for an individual to create and remove srp fleets and fleet data)
|
auth | user | srp_management ( Allows for an individual to create and remove srp fleets and fleet data)
|
||||||
|
auth | user | corputils ( Allows to look at what character belongs to which user and more. )
|
||||||
|
|
||||||
Active Developers
|
Active Developers
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
# Because corp-api only exist for the executor corp, this function will only be available in corporation mode.
|
# Because corp-api only exist for the executor corp, this function will only be available in corporation mode.
|
||||||
@login_required
|
@login_required
|
||||||
@permission_required('auth.corp_stats')
|
@permission_required('auth.corputils')
|
||||||
def corp_member_view(request):
|
def corp_member_view(request):
|
||||||
logger.debug("corp_member_view called by user %s" % request.user)
|
logger.debug("corp_member_view called by user %s" % request.user)
|
||||||
# Get the corp the member is in
|
# Get the corp the member is in
|
||||||
@ -70,7 +70,7 @@ def corp_member_view(request):
|
|||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@permission_required('auth.corp_stats')
|
@permission_required('auth.corputils')
|
||||||
def corputils_search(request):
|
def corputils_search(request):
|
||||||
logger.debug("corputils_search called by user %s" % request.user)
|
logger.debug("corputils_search called by user %s" % request.user)
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<h1 class="page-header text-center">Corporation Member Data</h1>
|
<h1 class="page-header text-center">Corporation Member Data</h1>
|
||||||
{% if perms.auth.corp_stats %}
|
{% if perms.auth.corputils %}
|
||||||
<div class="col-lg-12 container" id="example">
|
<div class="col-lg-12 container" id="example">
|
||||||
{% if corp %}
|
{% if corp %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -109,7 +110,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if perms.auth.corp_stats %}
|
{% if perms.auth.corputils %}
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
|
@ -19,6 +19,7 @@ def bootstrap_permissions():
|
|||||||
Permission.objects.get_or_create(codename="human_resources", content_type=ct, name="human_resources")
|
Permission.objects.get_or_create(codename="human_resources", content_type=ct, name="human_resources")
|
||||||
Permission.objects.get_or_create(codename="blue_member", content_type=ct, name="blue_member")
|
Permission.objects.get_or_create(codename="blue_member", content_type=ct, name="blue_member")
|
||||||
Permission.objects.get_or_create(codename="corp_stats", content_type=ct, name="corp_stats")
|
Permission.objects.get_or_create(codename="corp_stats", content_type=ct, name="corp_stats")
|
||||||
|
Permission.objects.get_or_create(codename="corputils", content_type=ct, name="corputils")
|
||||||
Permission.objects.get_or_create(codename="timer_management", content_type=ct, name="timer_management")
|
Permission.objects.get_or_create(codename="timer_management", content_type=ct, name="timer_management")
|
||||||
Permission.objects.get_or_create(codename="timer_view", content_type=ct, name="timer_view")
|
Permission.objects.get_or_create(codename="timer_view", content_type=ct, name="timer_view")
|
||||||
Permission.objects.get_or_create(codename="srp_management", content_type=ct, name="srp_management")
|
Permission.objects.get_or_create(codename="srp_management", content_type=ct, name="srp_management")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user