Skip to content

Commit

Permalink
Merge pull request #267 from B2SHARE/search/titles-missing-for-admin-…
Browse files Browse the repository at this point in the history
…#225

fixed #225 again: fresh records now not visible even for admin
  • Loading branch information
llehtine committed Apr 17, 2014
2 parents b890ac6 + fca6832 commit a014dc2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions invenio/lib/record_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ def decorated(recid, *args, **kwargs):

from invenio.search_engine import record_exists, get_merged_recid
if record_exists(recid) == 0:
# record doesn't exist
# record doesn't exist, abort so it doesn't get incorrectly cached
abort(apache.HTTP_NOT_FOUND) # The record is gone!

if check_fresh_record(current_user, recid):
return render_template('record_waitforit.html', recid=recid)

g.collection = collection = Collection.query.filter(
Collection.name == guess_primary_collection_of_a_record(recid)).\
one()
Expand All @@ -83,11 +86,8 @@ def decorated(recid, *args, **kwargs):
flash(_("Authorization failure"), 'error')
return redirect(url_for('webaccount.login', **url_args))
elif auth_code:
if check_fresh_record(current_user, recid):
return render_template('record_waitforit.html', recid=recid)
else:
flash(auth_msg, 'error')
abort(apache.HTTP_UNAUTHORIZED)
flash(auth_msg, 'error')
abort(apache.HTTP_UNAUTHORIZED)

from invenio.bibfield import get_record
# check if the current record has been deleted
Expand Down

0 comments on commit a014dc2

Please sign in to comment.