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 %}
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
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_anonymous.py", line 143, in test_guest_visibility_sidebar - self.assertFtest_edit_languagealse(self.check_element_on_page((By.ID, "nav_rand"))) -AttributeError: 'TestAnonymous' object has no attribute 'assertFtest_edit_languagealse'-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 783, in test_upload_cover_hdd - self.assertGreater(diff('original.png', 'jpeg.png', delete_diff_file=True), 0.02) -AssertionError: 0.0 not greater than 0.02+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 1011, in test_upload_book_cbr + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 986, in test_upload_book_cbt + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 961, in test_upload_book_cbz + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 923, in test_upload_book_epub + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 848, in test_upload_book_fb2 + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 873, in test_upload_book_lit + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 898, in test_upload_book_mobi + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 823, in test_upload_book_pdf + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 774, in test_upload_cover_hdd - self.assertGreater(diff('original.png', 'jpeg.png', delete_diff_file=True), 0.02) -AssertionError: 0.0 not greater than 0.02+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 844, in test_upload_book_epub + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 820, in test_upload_book_lit + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 928, in test_watch_metadata + File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 929, in test_watch_metadata self.assertNotIn('series', book) -AssertionError: 'series' unexpectedly found in {'id': 5, 'reader': [], 'title': 'testbook', 'author': ['John Döe'], 'rating': 0, 'languages': ['English'], 'identifier': [], 'cover': '/cover/5?edit=a92e572d-f9d5-45d0-a088-9751aaed41ca', 'tag': [], 'publisher': ['Randomhäus'], 'pubdate': 'Jan 19, 2017', 'comment': 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Aenean commodo ligula eget dolor.Aenean massa.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim.Donec pede justo, fringilla vel, aliquet nec, vulputate', 'add_shelf': [], 'del_shelf': [], 'edit_enable': True, 'kindle': None, 'kindlebtn': None, 'download': ['EPUB (6.7 kB)'], 'read': False, 'archived': False, 'series_all': 'Book 1 of test', 'series_index': '1', 'series': 'test', 'cust_columns': []}+AssertionError: 'series' unexpectedly found in {'id': 5, 'reader': [], 'title': 'testbook', 'author': ['John Döe'], 'rating': 0, 'languages': ['English'], 'identifier': [], 'cover': '/cover/5?edit=37b525ac-f7df-4630-8811-e9f937dd6c89', 'tag': [], 'publisher': ['Randomhäus'], 'pubdate': 'Jan 19, 2017', 'comment': 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Aenean commodo ligula eget dolor.Aenean massa.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim.Donec pede justo, fringilla vel, aliquet nec, vulputate', 'add_shelf': [], 'del_shelf': [], 'edit_enable': True, 'kindle': None, 'kindlebtn': None, 'download': ['EPUB (6.7 kB)'], 'read': False, 'archived': False, 'series_all': 'Book 1 of test', 'series_index': '1', 'series': 'test', 'cust_columns': []}
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 144, in test_email_limit + upload.send_keys(random_file) +AttributeError: 'bool' object has no attribute 'send_keys'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_reader.py", line 229, in test_sound_listener + self.sound_test('music.flac', 'Unknown - music', '0:02') + File "/home/ozzie/Development/calibre-web-test/test/test_reader.py", line 189, in sound_test + upload.send_keys(upload_file) +AttributeError: 'bool' object has no attribute 'send_keys'+