mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
HR Group now a setting
This commit is contained in:
@@ -7,6 +7,8 @@ from django.contrib.auth.models import User
|
|||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
|
|
||||||
|
import settings
|
||||||
|
|
||||||
from eve_api.models import EVEPlayerCorporation
|
from eve_api.models import EVEPlayerCorporation
|
||||||
|
|
||||||
from hr.forms import CreateRecommendationForm, CreateApplicationForm
|
from hr.forms import CreateRecommendationForm, CreateApplicationForm
|
||||||
@@ -14,7 +16,7 @@ from hr.models import Recommendation, Application
|
|||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
if request.user.is_staff or 'hrstaff' in request.user.groups.all():
|
if request.user.is_staff or settings.HR_STAFF_GROUP in request.user.groups.all():
|
||||||
hrstaff = True
|
hrstaff = True
|
||||||
|
|
||||||
return render_to_response('hr/index.html', locals(), context_instance=RequestContext(request))
|
return render_to_response('hr/index.html', locals(), context_instance=RequestContext(request))
|
||||||
|
|||||||
@@ -141,3 +141,7 @@ MINING_DATABASE = 'dreddit_mining'
|
|||||||
# Mining buddy secret key (in the config)
|
# Mining buddy secret key (in the config)
|
||||||
MINING_SALT = 's98ss7fsc7fd2rf62ctcrlwztstnzve9toezexcsdhfgviuinusxcdtsvbrg'
|
MINING_SALT = 's98ss7fsc7fd2rf62ctcrlwztstnzve9toezexcsdhfgviuinusxcdtsvbrg'
|
||||||
|
|
||||||
|
### HR Settings
|
||||||
|
|
||||||
|
HR_STAFF_GROUP = 'hrstaff'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user