HR Group now a setting

This commit is contained in:
2010-04-05 12:27:05 +01:00
parent 7980e4bcb4
commit 2776ce8c16
2 changed files with 7 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
import settings
from eve_api.models import EVEPlayerCorporation
from hr.forms import CreateRecommendationForm, CreateApplicationForm
@@ -14,7 +16,7 @@ from hr.models import Recommendation, Application
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
return render_to_response('hr/index.html', locals(), context_instance=RequestContext(request))

View File

@@ -141,3 +141,7 @@ MINING_DATABASE = 'dreddit_mining'
# Mining buddy secret key (in the config)
MINING_SALT = 's98ss7fsc7fd2rf62ctcrlwztstnzve9toezexcsdhfgviuinusxcdtsvbrg'
### HR Settings
HR_STAFF_GROUP = 'hrstaff'