Fix for adding/deleting visibility restrictions on custom columns/tags
This commit is contained in:
parent
592288cb22
commit
b85627da5c
15
cps/admin.py
15
cps/admin.py
|
@ -756,7 +756,12 @@ def prepare_tags(user, action, tags_name, id_list):
|
||||||
return ",".join(saved_tags_list)
|
return ",".join(saved_tags_list)
|
||||||
|
|
||||||
|
|
||||||
@admi.route("/ajax/addrestriction/<int:res_type>", defaults={"user_id": 0}, methods=['POST'])
|
@admi.route("/ajax/addrestriction/<int:res_type>", methods=['POST'])
|
||||||
|
@login_required
|
||||||
|
@admin_required
|
||||||
|
def add_user_0_restriction(res_type):
|
||||||
|
return add_restriction(res_type, 0)
|
||||||
|
|
||||||
@admi.route("/ajax/addrestriction/<int:res_type>/<int:user_id>", methods=['POST'])
|
@admi.route("/ajax/addrestriction/<int:res_type>/<int:user_id>", methods=['POST'])
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
|
@ -803,7 +808,13 @@ def add_restriction(res_type, user_id):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
@admi.route("/ajax/deleterestriction/<int:res_type>", defaults={"user_id": 0}, methods=['POST'])
|
@admi.route("/ajax/deleterestriction/<int:res_type>", methods=['POST'])
|
||||||
|
@login_required
|
||||||
|
@admin_required
|
||||||
|
def delete_user_0_restriction(res_type):
|
||||||
|
return delete_restriction(res_type, 0)
|
||||||
|
|
||||||
|
|
||||||
@admi.route("/ajax/deleterestriction/<int:res_type>/<int:user_id>", methods=['POST'])
|
@admi.route("/ajax/deleterestriction/<int:res_type>/<int:user_id>", methods=['POST'])
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
|
|
|
@ -12,7 +12,7 @@ rsa>=3.4.2,<4.8.0
|
||||||
six>=1.10.0,<1.17.0
|
six>=1.10.0,<1.17.0
|
||||||
|
|
||||||
# Gdrive and Gmail integration
|
# Gdrive and Gmail integration
|
||||||
google-api-python-client>=1.7.11,<2.32.0
|
google-api-python-client>=1.7.11,<2.34.0
|
||||||
|
|
||||||
# Gmail
|
# Gmail
|
||||||
google-auth-oauthlib>=0.4.3,<0.5.0
|
google-auth-oauthlib>=0.4.3,<0.5.0
|
||||||
|
|
|
@ -56,7 +56,7 @@ install_requires =
|
||||||
|
|
||||||
[options.extras_require]
|
[options.extras_require]
|
||||||
gdrive =
|
gdrive =
|
||||||
google-api-python-client>=1.7.11,<2.32.0
|
google-api-python-client>=1.7.11,<2.34.0
|
||||||
gevent>20.6.0,<22.0.0
|
gevent>20.6.0,<22.0.0
|
||||||
greenlet>=0.4.17,<1.2.0
|
greenlet>=0.4.17,<1.2.0
|
||||||
httplib2>=0.9.2,<0.21.0
|
httplib2>=0.9.2,<0.21.0
|
||||||
|
@ -70,7 +70,7 @@ gdrive =
|
||||||
six>=1.10.0,<1.17.0
|
six>=1.10.0,<1.17.0
|
||||||
gmail =
|
gmail =
|
||||||
google-auth-oauthlib>=0.4.3,<0.5.0
|
google-auth-oauthlib>=0.4.3,<0.5.0
|
||||||
google-api-python-client>=1.7.11,<2.32.0
|
google-api-python-client>=1.7.11,<2.34.0
|
||||||
goodreads =
|
goodreads =
|
||||||
goodreads>=0.3.2,<0.4.0
|
goodreads>=0.3.2,<0.4.0
|
||||||
python-Levenshtein>=0.12.0,<0.13.0
|
python-Levenshtein>=0.12.0,<0.13.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user