Skip to content

Commit

Permalink
requirements fixed, TODO updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pdamoune committed Aug 21, 2019
1 parent c7f8994 commit b8db3e2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 65 deletions.
7 changes: 7 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
[V] Permissions anonymous/user/admin
[V] Flask Admin with bootstrap4, permissions set

[X] Mail settings
[X] Moderator blueprints/access
[X] Redis
[X] Facebook/Google API Authentication
[X] Flask Moment for time management
[X] Search tool

[V] Test Register
[V] Test Login
[V] Test Logout
Expand Down
7 changes: 7 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def can(self, perm):
def is_administrator(self):
return self.can(Permission.ADMIN)

def is_supervisor(self):
return self.can(Permission.ADMIN)



class AnonymousUser(AnonymousUserMixin):
def can(self, permissions):
Expand All @@ -111,6 +115,9 @@ def can(self, permissions):
def is_administrator(self):
return False

def is_moderator(self):
return self.can(Permission.ADMIN)


login_manager.anonymous_user = AnonymousUser

Expand Down
64 changes: 0 additions & 64 deletions app/templates/admin/user.html

This file was deleted.

16 changes: 16 additions & 0 deletions app/templates/supervisor/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}Boilerplate{% endblock %}

{% block page_content %}
<div class="container">
<div class="page-header">
<div class="card">
<div class="card-body">
<h1>Rapports</h1>
</div>
</div>
</div>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ coverage==4.5.4
dominate==2.3.5
Faker==2.0.0
Flask==1.1.1
Flask-Admin==1.5.0
git+git://github.com/ryanbeymer/flask-admin.git
Flask-Bootstrap4==4.0.2
Flask-DebugToolbar==0.10.1
Flask-Login==0.4.1
Expand Down

0 comments on commit b8db3e2

Please sign in to comment.