MCPcopy Index your code
hub / github.com/ddserver/ddserver / wrapped

Function wrapped

ddserver/interface/user.py:150–163  ·  view source on GitHub ↗
(users,
                messages,
                *args,
                **kwargs)

Source from the content-addressed store, hash-verified

148 @require(users = 'ddserver.interface.user:UserManager',
149 messages = 'ddserver.interface.message:MessageManager')
150 def wrapped(users,
151 messages,
152 *args,
153 **kwargs):
154 user = users.authorized
155
156 if not user or (admin and not user.admin):
157 messages.error('You are not authorized to display this page!')
158 bottle.redirect('/')
159
160 # Inject the user in the wrapped function
161 return func(*args,
162 user = user,
163 **kwargs)
164
165 return wrapped
166 return wrapper

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected