mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Fixes some small issues with HR
This commit is contained in:
@@ -27,7 +27,7 @@ def blacklist_values(user, level=BLACKLIST_LEVEL_NOTE):
|
||||
"""
|
||||
|
||||
blacklist = []
|
||||
bl_items = Blacklist.objects.filter(level__lte=level, models.Q(expiry_date__gt=datetime.now()) | models.Q(expiry_date=None))
|
||||
bl_items = Blacklist.objects.filter(models.Q(expiry_date__gt=datetime.now()) | models.Q(expiry_date=None), level__lte=level)
|
||||
|
||||
# Check Reddit blacklists
|
||||
if installed('reddit'):
|
||||
|
||||
@@ -64,7 +64,9 @@ def check_permissions(user, application=None):
|
||||
@login_required
|
||||
def index(request):
|
||||
hrstaff = check_permissions(request.user)
|
||||
can_recommend = len(blacklist_values(request.user, BLACKLIST_LEVEL_ADVISORY))
|
||||
can_recommend = False
|
||||
if len(blacklist_values(request.user, BLACKLIST_LEVEL_ADVISORY)) == 0:
|
||||
can_recommend = True
|
||||
return render_to_response('hr/index.html', locals(), context_instance=RequestContext(request))
|
||||
|
||||
### Application Management
|
||||
|
||||
Reference in New Issue
Block a user