Skip to content

Commit a782a0e

Browse files
committed
Fixing ldap, adding ignores, and a manifest
1 parent d945a1c commit a782a0e

File tree

5 files changed

+40
-15
lines changed

5 files changed

+40
-15
lines changed

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,18 @@ config.py
108108

109109
# Generated Assets
110110
packet/static/css/packet.css
111-
*.min.css
111+
*.min.css
112+
packet/static/android-chrome-192x192.png
113+
packet/static/android-chrome-512x512.png
114+
packet/static/apple-touch-icon.png
115+
packet/static/browserconfig.xml
116+
packet/static/favicon-16x16.png
117+
packet/static/favicon-32x32.png
118+
packet/static/favicon.ico
119+
packet/static/mstile-144x144.png
120+
packet/static/mstile-150x150.png
121+
packet/static/mstile-310x150.png
122+
packet/static/mstile-310x310.png
123+
packet/static/mstile-70x70.png
124+
packet/static/safari-pinned-tab.svg
125+
packet/static/site.webmanifest

packet/ldap.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ def _ldap_is_member_of_group(member, group):
1717
return False
1818

1919

20-
def _ldap_add_member_to_group(account, group):
21-
if not _ldap_is_member_of_group(account, group):
22-
_ldap.get_group(group).add_member(account, dn=False)
23-
24-
25-
def _ldap_remove_member_from_group(account, group):
26-
if _ldap_is_member_of_group(account, group):
27-
_ldap.get_group(group).del_member(account, dn=False)
28-
29-
3020
@lru_cache(maxsize=1024)
3121
def _ldap_is_member_of_directorship(account, directorship):
3222
directors = _ldap.get_directorship_heads(directorship)

packet/static/manifest.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"background_color": "#FFF",
3+
"description": "CSH WebPacket",
4+
"dir": "auto",
5+
"display": "standalone",
6+
"lang": "en",
7+
"name": "CSH Packet",
8+
"orientation": "portrait",
9+
"short_name": "Packet",
10+
"start_url": "/",
11+
"theme_color": "#b0197e",
12+
"icons": [
13+
{
14+
"src": "/static/android-chrome-192x192.png",
15+
"sizes": "192x192",
16+
"type": "image/png"
17+
},
18+
{
19+
"src": "/static/android-chrome-512x512.png",
20+
"sizes": "512x512",
21+
"type": "image/png"
22+
}
23+
]
24+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<footer class="py-5 bg">
22
<div class="container">
3-
<p class="m-0 text-center text-white"><a href="https://github.com/ComputerScienceHouse/packet">{{ info.git_revision }}</a>
3+
<p class="m-0 text-center text-white"><a href="https://github.com/ComputerScienceHouse/packet"> CSH Packet 3.0.0</a>
44
</p>
55
</div>
66
</footer>

packet/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Credit to Liam Middlebrook and Ram Zallan
22
# https://github.com/liam-middlebrook/gallery
33
import datetime
4-
import subprocess
54
from functools import wraps
65

76
import requests
@@ -18,12 +17,10 @@
1817
def before_request(func):
1918
@wraps(func)
2019
def wrapped_function(*args, **kwargs):
21-
git_revision = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').rstrip()
2220
uuid = str(session["userinfo"].get("sub", ""))
2321
uid = str(session["userinfo"].get("preferred_username", ""))
2422
user_obj = _ldap.get_member(uid, uid=True)
2523
info = {
26-
"git_revision": git_revision,
2724
"uuid": uuid,
2825
"uid": uid,
2926
"user_obj": user_obj,

0 commit comments

Comments
 (0)