This repository was archived by the owner on Feb 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-49
lines changed Expand file tree Collapse file tree 5 files changed +7
-49
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ def hide(quote_id):
325325 """
326326 metadata = get_metadata ()
327327 quote = Quote .query .get (quote_id )
328- if not metadata ['is_admin' ]:
328+ if not ( metadata ['uid' ] == quote . submitter or metadata [ 'uid' ] == quote . speaker or metadata [ ' is_admin' ]) :
329329 abort (403 )
330330 if not quote :
331331 abort (404 )
Original file line number Diff line number Diff line change 1010 {% with messages = get_flashed_messages(with_categories=true) %}
1111 {% if messages %}
1212 {% for category, message in messages %}
13- < script >
14- switch ( category ) {
15- case warning :
16- category = warning
17- case error :
18- category = danger
19- case
20- default :
21- category = success
22- }
23- </ script >
2413 < div class ="alert alert-{{ category }} " role ="alert ">
2514 {{ message }}
2615 </ div >
Original file line number Diff line number Diff line change 1010 // Get the modal
1111 var modal = document . getElementById ( `unhide_${ id } ` ) ;
1212 modal . style . display = "block" ;
13- }
14- function unhideClose ( id ) {
15- // Get the modal
16- var modal = document . getElementById ( `unhide_${ id } ` ) ;
17- modal . style . display = "none" ;
18- }
13+ }
14+ function unhideClose ( id ) {
15+ // Get the modal
16+ var modal = document . getElementById ( `unhide_${ id } ` ) ;
17+ modal . style . display = "none" ;
18+ }
1919 </ script >
2020 < div class ="container ">
2121 <!-- flash relevant message when submit button is clicked -->
2222 {% with messages = get_flashed_messages(with_categories=true) %}
2323 {% if messages %}
2424 {% for category, message in messages %}
25- < script >
26- switch ( category ) {
27- case warning :
28- category = warning
29- case error :
30- category = danger
31- default :
32- category = success
33- }
34- </ script >
3525 < div class ="alert alert-{{ category }} " role ="alert ">
3626 {{ message }}
3727 </ div >
Original file line number Diff line number Diff line change 66 {% with messages = get_flashed_messages(with_categories=true) %}
77 {% if messages %}
88 {% for category, message in messages %}
9- < script >
10- switch ( category ) {
11- case warning :
12- category = warning
13- case error :
14- category = danger
15- case
16- default :
17- category = success
18- }
19- </ script >
209 < div class ="alert alert-{{ category }} " role ="alert ">
2110 {{ message }}
2211 </ div >
Original file line number Diff line number Diff line change 3232 {% with messages = get_flashed_messages(with_categories=true) %}
3333 {% if messages %}
3434 {% for category, message in messages %}
35- < script >
36- switch ( category ) {
37- case warning :
38- category = warning
39- case error :
40- category = danger
41- default :
42- category = success
43- }
44- </ script >
4535 < div class ="alert alert-{{ category }} " role ="alert ">
4636 {{ message }}
4737 </ div >
You can’t perform that action at this time.
0 commit comments