fixed missing error in design when app does not exist
This commit is contained in:
committed by
Michele Comitini
parent
4ce6d03d89
commit
838a1ffc82
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.6.0-development+timestamp.2013.08.23.14.21.37
|
||||
Version 2.6.0-development+timestamp.2013.08.23.14.37.05
|
||||
|
||||
@@ -86,8 +86,9 @@ def safe_write(a, value, b='w'):
|
||||
|
||||
def get_app(name=None):
|
||||
app = name or request.args(0)
|
||||
if app and (not MULTI_USER_MODE or is_manager() or
|
||||
db(db.app.name == app)(db.app.owner == auth.user.id).count()):
|
||||
if (app and os.path.exists(os.path.join(os.path.dirname(request.folder),app)) and
|
||||
(not MULTI_USER_MODE or is_manager() or
|
||||
db(db.app.name == app)(db.app.owner == auth.user.id).count())):
|
||||
return app
|
||||
session.flash = T('App does not exist or your are not authorized')
|
||||
redirect(URL('site'))
|
||||
|
||||
Reference in New Issue
Block a user