diff --git a/cps/editbooks.py b/cps/editbooks.py index 929aa1a7..75f1c96e 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -67,7 +67,7 @@ log = logger.create() def upload_required(f): @wraps(f) def inner(*args, **kwargs): - if current_user.role_upload() or current_user.role_admin(): + if current_user.role_upload(): return f(*args, **kwargs) abort(403) diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 21ae98e6..cac3219c 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -98,8 +98,7 @@ - {% if g.user.role_upload() or g.user.role_admin()%} - {% if g.allow_upload %} + {% if g.user.role_upload() and g.allow_upload %}
@@ -109,7 +108,6 @@
- {% endif %} {% endif %}
@@ -197,14 +195,12 @@
{% endfor %} {% endif %} - {% if g.user.role_upload() or g.user.role_admin()%} - {% if g.allow_upload %} + {% if g.user.role_upload() and g.allow_upload %}
- {% endif %} {% endif %}
diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index 4d6c68ce..f61ca9a5 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -105,7 +105,7 @@
- +
diff --git a/cps/templates/layout.html b/cps/templates/layout.html index 09b3f507..8cb6b76e 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -58,8 +58,7 @@ {% endif %}
- {% endif %} {% endif %} {% if not g.user.is_anonymous %}
  • diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 55c6bf1e..60fa4514 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
    -

    Start Time: 2021-11-22 21:51:33

    +

    Start Time: 2021-11-24 20:41:04

    -

    Stop Time: 2021-11-23 01:35:04

    +

    Stop Time: 2021-11-25 00:24:57

    -

    Duration: 3h 2 min

    +

    Duration: 3h 3 min

    @@ -102,12 +102,12 @@ - + TestAnonymous 13 - 12 + 13 + 0 0 - 1 0 Detail @@ -224,31 +224,11 @@ - +
    TestAnonymous - test_guest_visibility_sidebar
    - -
    - ERROR -
    - - - - + PASS @@ -901,12 +881,12 @@ AttributeError: 'TestAnonymous' object has no attribute 'assertFtest - + TestEditBooks 35 - 33 - 1 + 26 0 + 8 1 Detail @@ -1166,98 +1146,26 @@ AttributeError: 'TestAnonymous' object has no attribute 'assertFtest - +
    TestEditBooks - test_upload_book_cbr
    - PASS - - - - - - -
    TestEditBooks - test_upload_book_cbt
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_cbz
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_epub
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_fb2
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_lit
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_mobi
    - - PASS - - - - - - -
    TestEditBooks - test_upload_book_pdf
    - - PASS - - - - - - -
    TestEditBooks - test_upload_cover_hdd
    -
    - FAIL + ERROR
    - @@ -1722,12 +1862,12 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're - + TestSSL 7 - 7 - 0 + 6 0 + 1 0 Detail @@ -1781,11 +1921,31 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're - +
    TestSSL - test_email_limit
    - PASS + +
    + ERROR +
    + + + + @@ -2888,12 +3048,12 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're - + TestReader 5 - 5 - 0 + 4 0 + 1 0 Detail @@ -2929,11 +3089,33 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're - +
    TestReader - test_sound_listener
    - PASS + +
    + ERROR +
    + + + + @@ -4268,9 +4450,9 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're Total 376 - 366 - 3 + 357 1 + 12 6   @@ -4677,7 +4859,7 @@ AssertionError: 'series' unexpectedly found in {'id': 5, 're