Skip to content

Commit 8ea276a

Browse files
committed
chore: added env example
1 parent 6ae87e4 commit 8ea276a

File tree

116 files changed

+33330
-33327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+33330
-33327
lines changed

.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SECRET_KEY=\xdd\x92\xff,\xe
2+
ENVIRONMENT=development
3+
MONGO_URI=

.gitattributes

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*.css linguist-detectable=false
2-
*.html linguist-detectable=false
3-
*.less linguist-detectable=false
1+
*.css linguist-detectable=false
2+
*.html linguist-detectable=false
3+
*.less linguist-detectable=false
44
*.js linguist-detectable=false

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
venv
2-
__pycache__
3-
.env
1+
venv
2+
__pycache__
3+
.env
44
t.py

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Attribute Based Access Control
2-
3-
**A researched project that implements Attribute-Based Access Control in an EHR system. By encrypting EHRs using policies defined based on specific attributes, health care systems can be able to restrict how a data is accessed and what each user can do to the data being accessed.**
1+
# Attribute Based Access Control
2+
3+
**A researched project that implements Attribute-Based Access Control in an EHR system. By encrypting EHRs using policies defined based on specific attributes, health care systems can be able to restrict how a data is accessed and what each user can do to the data being accessed.**

abac/__init__.py

+37-37
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
from flask import Flask
2-
from abac.config import Config
3-
from flask_bcrypt import Bcrypt
4-
from flask_cors import CORS
5-
from flask_pymongo import PyMongo
6-
7-
8-
# instantiating pymongo
9-
mongo = PyMongo()
10-
# mongo = "make"
11-
12-
# instantiating bcrypt for password hash
13-
bcrypt = Bcrypt()
14-
15-
# setting up CORS
16-
cors = CORS()
17-
18-
19-
# creating the app function
20-
def create_app(config_class=Config):
21-
app = Flask(__name__)
22-
app.config.from_object(Config)
23-
mongo.init_app(app, ssl=True, ssl_cert_reqs='CERT_NONE')
24-
bcrypt.init_app(app)
25-
cors.init_app(app)
26-
27-
from abac.main.routes import main, page_not_found
28-
from abac.patients.routes import patients
29-
from abac.admin.routes import admin
30-
from abac.workers.routes import workers
31-
app.register_error_handler(404, page_not_found)
32-
app.register_blueprint(main)
33-
app.register_blueprint(patients, url_prefix='/patients')
34-
app.register_blueprint(admin, url_prefix='/admin')
35-
app.register_blueprint(workers, url_prefix='/workers')
36-
37-
return app
1+
from flask import Flask
2+
from abac.config import Config
3+
from flask_bcrypt import Bcrypt
4+
from flask_cors import CORS
5+
from flask_pymongo import PyMongo
6+
7+
8+
# instantiating pymongo
9+
mongo = PyMongo()
10+
# mongo = "make"
11+
12+
# instantiating bcrypt for password hash
13+
bcrypt = Bcrypt()
14+
15+
# setting up CORS
16+
cors = CORS()
17+
18+
19+
# creating the app function
20+
def create_app(config_class=Config):
21+
app = Flask(__name__)
22+
app.config.from_object(Config)
23+
mongo.init_app(app, ssl=True, ssl_cert_reqs='CERT_NONE')
24+
bcrypt.init_app(app)
25+
cors.init_app(app)
26+
27+
from abac.main.routes import main, page_not_found
28+
from abac.patients.routes import patients
29+
from abac.admin.routes import admin
30+
from abac.workers.routes import workers
31+
app.register_error_handler(404, page_not_found)
32+
app.register_blueprint(main)
33+
app.register_blueprint(patients, url_prefix='/patients')
34+
app.register_blueprint(admin, url_prefix='/admin')
35+
app.register_blueprint(workers, url_prefix='/workers')
36+
37+
return app

0 commit comments

Comments
 (0)