Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Side by Side Diff: appengine/components/components/auth/api.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The LUCI Authors. All rights reserved. 1 # Copyright 2014 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Defines main bulk of public API of auth component. 5 """Defines main bulk of public API of auth component.
6 6
7 Functions defined here can be safely called often (multiple times per request), 7 Functions defined here can be safely called often (multiple times per request),
8 since they are using in-memory read only cache of Auth DB entities. 8 since they are using in-memory read only cache of Auth DB entities.
9 9
10 Functions that operate on most current state of DB are in model.py. And they are 10 Functions that operate on most current state of DB are in model.py. And they are
11 generally should not be used outside of Auth components implementation. 11 generally should not be used outside of Auth components implementation.
12 """ 12 """
13 13
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 # Propagate reference to original function, mark function as decorated. 963 # Propagate reference to original function, mark function as decorated.
964 wrapper.__wrapped__ = original 964 wrapper.__wrapped__ = original
965 wrapper.__auth_require = True 965 wrapper.__auth_require = True
966 966
967 return wrapper 967 return wrapper
968 968
969 969
970 def is_decorated(func): 970 def is_decorated(func):
971 """Return True if |func| is decorated by @public or @require decorators.""" 971 """Return True if |func| is decorated by @public or @require decorators."""
972 return hasattr(func, '__auth_public') or hasattr(func, '__auth_require') 972 return hasattr(func, '__auth_public') or hasattr(func, '__auth_require')
OLDNEW
« no previous file with comments | « appengine/components/components/auth/__init__.py ('k') | appengine/components/components/auth/api_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698