Ignore:
Timestamp:
24 Nov 2011, 11:31:04 (13 years ago)
Author:
Henrik Bettermann
Message:

Rename functions according to the WAeUP style guide:

functions and methods with property decorator with underscore

methods with CamelCase

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt

    r7185 r7186  
    1313roles.
    1414
    15 :func:`getAllRoles`
    16 -------------------
     15:func:`get_all_roles`
     16---------------------
    1717
    1818Gives us all roles defined in a WAeUP SIRP portal. We get tuples of
     
    2424with the ZCA (a string) and ``<ROLE>`` is the real role object.
    2525
    26     >>> from waeup.sirp.permissions import getAllRoles
    27     >>> getAllRoles()
     26    >>> from waeup.sirp.permissions import get_all_roles
     27    >>> get_all_roles()
    2828    <generator object...at 0x...>
    2929
    30     >>> sorted(list(getAllRoles()))
     30    >>> sorted(list(get_all_roles()))
    3131    [(u'waeup.ACManager', <waeup.sirp.permissions.ACManager object at 0x...]
    3232
    33 :func:`getWAeUPRoles`
    34 ---------------------
     33:func:`get_waeup_roles`
     34-----------------------
    3535
    3636Gives us all roles, except the WAeUP specific roles. We can get a list
    3737with or without local roles:
    3838
    39     >>> from waeup.sirp.permissions import getWAeUPRoles
    40     >>> len(list(getWAeUPRoles()))
     39    >>> from waeup.sirp.permissions import get_waeup_roles
     40    >>> len(list(get_waeup_roles()))
    4141    10
    4242
    43     >>> len(list(getWAeUPRoles(also_local=True)))
     43    >>> len(list(get_waeup_roles(also_local=True)))
    4444    16
    4545
    4646
    47 :func:`getRoleNames`
    48 --------------------
     47:func:`get_waeup_role_names`
     48----------------------------
    4949
    5050We can get all role names defined in a WAeUP portal (except 'local'
    5151roles that are meant not to be assigned globally):
    5252
    53     >>> from waeup.sirp.permissions import getWAeUPRoleNames
    54     >>> list(getWAeUPRoleNames())
     53    >>> from waeup.sirp.permissions import get_waeup_role_names
     54    >>> list(get_waeup_role_names())
    5555    [u'waeup.ACManager', u'waeup.AcademicsOfficer',
    5656     u'waeup.AccommodationOfficer', u'waeup.Applicant',
Note: See TracChangeset for help on using the changeset viewer.