|
|
| url(self,
f=threading.local(),
args=threading.local(),
vars=threading.local(),
scheme=True) |
source code
|
|
|
|
|
|
|
__init__(self,
environment=threading.local(),
db=threading.local(),
mailer=True,
hmac_key=threading.local(),
controller='default',
function='user',
cas_provider=threading.local(),
signature=True,
secure=True)
auth=Auth(db)... |
source code
|
|
|
|
_get_user_id(self)
accessor for auth.user_id |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_HTTP(self,
*a,
**b)
only used in lambda: self._HTTP(404) |
source code
|
|
|
|
|
|
|
navbar(self,
prefix='Welcome',
action=threading.local(),
separators=(' [ ', ' | ', ' ] '),
user_identifier=<function <lambda> at 0x422dde8>,
referrer_actions=<function <lambda> at 0x422dde8>,
mode='default') |
source code
|
|
|
|
| __get_migrate(self,
tablename,
migrate=True) |
source code
|
|
|
|
enable_record_versioning(self,
tables,
archive_db=threading.local(),
archive_names='%(tablename)s_archive',
current_record='current_record')
to enable full record versioning (including auth tables): |
source code
|
|
|
|
|
|
|
define_tables(self,
username=threading.local(),
signature=threading.local(),
migrate=True,
fake_migrate=True)
to be called unless tables are defined manually
usages:
# defines all needed tables and table files
# 'myprefix_auth_user.table', ... |
source code
|
|
|
|
|
|
|
get_or_create_user(self,
keys,
update_fields=['email'])
Used for alternate login methods:
If the user exists already then password is updated. |
source code
|
|
|
|
|
|
|
login_user(self,
user)
login the user = db.auth_user(id) |
source code
|
|
|
|
login_bare(self,
username,
password)
logins user as specified by usernname (or email) and password |
source code
|
|
|
|
| cas_login(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>,
version=threading.local()) |
source code
|
|
|
|
| cas_validate(self,
version=threading.local(),
proxy=True) |
source code
|
|
|
|
login(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a login form... |
source code
|
|
|
|
logout(self,
next=<function <lambda> at 0x422dde8>,
onlogout=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
logout and redirects to login... |
source code
|
|
|
|
register(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a registration form... |
source code
|
|
|
|
|
|
|
verify_email(self,
next=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
action user to verify the registration email, XXXXXXXXXXXXXXXX... |
source code
|
|
|
|
retrieve_username(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form to retrieve the user username... |
source code
|
|
|
|
|
|
|
reset_password_deprecated(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form to reset the user password (deprecated)... |
source code
|
|
|
|
reset_password(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form to reset the user password... |
source code
|
|
|
|
request_reset_password(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form to reset the user password... |
source code
|
|
|
|
|
|
|
| retrieve_password(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>) |
source code
|
|
|
|
change_password(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form that lets the user change password... |
source code
|
|
|
|
profile(self,
next=<function <lambda> at 0x422dde8>,
onvalidation=<function <lambda> at 0x422dde8>,
onaccept=<function <lambda> at 0x422dde8>,
log=<function <lambda> at 0x422dde8>)
returns a form that lets the user change his/her profile... |
source code
|
|
|
|
|
|
|
impersonate(self,
user_id=<function <lambda> at 0x422dde8>)
usage: POST TO http://..../impersonate
request.post_vars.user_id=<id> set request.post_vars.user_id to
0 to restore original user. |
source code
|
|
|
|
|
|
|
groups(self)
displays the groups and their roles for the logged in user |
source code
|
|
|
|
not_authorized(self)
you can change the view for this page to make it look as you
like |
source code
|
|
|
|
requires(self,
condition,
requires_login=True,
otherwise=threading.local())
decorator that prevents access to action if not logged in |
source code
|
|
|
|
requires_login(self,
otherwise=threading.local())
decorator that prevents access to action if not logged in |
source code
|
|
|
|
requires_membership(self,
role=threading.local(),
group_id=threading.local(),
otherwise=threading.local())
decorator that prevents access to action if not logged in or if
user logged in is not a member of group_id. |
source code
|
|
|
|
requires_permission(self,
name,
table_name='',
record_id=0,
otherwise=threading.local())
decorator that prevents access to action if not logged in or if
user logged in is not a member of any group (role) that has 'name'
access to 'table_name', 'record_id'. |
source code
|
|
|
|
requires_signature(self,
otherwise=threading.local())
decorator that prevents access to action if not logged in or if
user logged in is not a member of group_id. |
source code
|
|
|
|
add_group(self,
role,
description='')
creates a group associated to a role |
source code
|
|
|
|
|
|
|
id_group(self,
role)
returns the group_id of the group specified by the role |
source code
|
|
|
|
user_group(self,
user_id=threading.local())
returns the group_id of the group uniquely associated to this user
i.e. |
source code
|
|
|
|
| user_group_role(self,
user_id=threading.local()) |
source code
|
|
|
|
has_membership(self,
group_id=threading.local(),
user_id=threading.local(),
role=threading.local())
checks if user is member of group_id or role |
source code
|
|
|
|
add_membership(self,
group_id=threading.local(),
user_id=threading.local(),
role=threading.local())
gives user_id membership of group_id or role if user is None than
user_id is that of current logged in user |
source code
|
|
|
|
del_membership(self,
group_id=threading.local(),
user_id=threading.local(),
role=threading.local())
revokes membership from group_id to user_id if user_id is None
than user_id is that of current logged in user |
source code
|
|
|
|
has_permission(self,
name='any',
table_name='',
record_id=0,
user_id=threading.local(),
group_id=threading.local())
checks if user_id or current logged in user is member of a group
that has 'name' permission on 'table_name' and 'record_id' if
group_id is passed, it checks whether the group has the
permission |
source code
|
|
|
|
add_permission(self,
group_id,
name='any',
table_name='',
record_id=0)
gives group_id 'name' access to 'table_name' and 'record_id' |
source code
|
|
|
|
del_permission(self,
group_id,
name='any',
table_name='',
record_id=0)
revokes group_id 'name' access to 'table_name' and 'record_id' |
source code
|
|
|
|
accessible_query(self,
name,
table,
user_id=threading.local())
returns a query with all accessible records for user_id or... |
source code
|
|
|
|
wiki(self,
slug=threading.local(),
env=threading.local(),
render='markmin',
manage_permissions=True,
force_prefix='',
restrict_search=True,
resolve=True,
extra=threading.local(),
menugroups=threading.local()) |
source code
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|