Back to index

plone3  3.1.7
browser.py
Go to the documentation of this file.
00001 from zope.interface import Interface
00002 
00003 class IPASInfoView(Interface):
00004 
00005     def hasLoginPasswordExtractor():
00006         """Check if a login & password extraction plugin is active.
00007 
00008         Check if there is a plugin with an enabled
00009         ILoginPasswordExtractionPlugin interface. This can be used to
00010         conditionally show username & password logins.
00011         """
00012 
00013     def hasOpenIDdExtractor():
00014         """Check if an OpenID extraction plugin is active.
00015         """
00016 
00017 
00018 class IPASSearchView(Interface):
00019 
00020     def searchUsers(sort_by=None, any_field=None, **criteria):
00021         """Search for users matching a set of criteria.
00022 
00023         The criteria are a dictionary mapping user properties to values and
00024         have the semantics declared by IPluggableAuthService.searchUsers().
00025         Duplicate results returned by PAS are filtered so only the first
00026         result remains in the result set. The results can be sorted on
00027         sort_bys (case insensitive).
00028         
00029         In addition, a single search string can be sought in multiple
00030         fields at a time by passing any_field='your-string'. The fields
00031         that will be searched are not explicitly enumerated but will be the
00032         user-facing ones a user would expect to search, such as login name
00033         and full name. (Perhaps any_field should/could be moved into PAS
00034         proper. This could be done without breaking code that depends on
00035         this interface.)
00036         
00037         If you specify both any_field and other criteria that include a
00038         field that any_field would typically search (such as login name),
00039         the other criteria will be enforced at the expense of any_field.
00040         """
00041 
00042 
00043     def searchUsersByRequest(request, sort_by=None):
00044         """Search for users matching a set of criteria found in a request.
00045 
00046         This method will look remove any obvious values from the request
00047         which are not search criteria. It will also remove any fields
00048         which have an empty string value.
00049         Duplicate results returned by PAS are filtered so only the first
00050         result remains in the result set. The results can be sorted on
00051         sort_by (case insensitive).
00052         """
00053 
00054 
00055     def searchGroups(**criteria):
00056         """Search for groups matching a set of criteria.
00057 
00058         The criteria are a dictionary mapping group properties
00059         to values and have the semantics declared by
00060         IPluggableAuthService.searchGroups().
00061         """
00062 
00063 
00064     def searchGroupsByRequest(request):
00065         """Search for groups matching a set of criteria found in a request.
00066 
00067         This method will look remove any obvious values from the request
00068         which are not search criteria. It will also remove any fields
00069         which have an empty string value.
00070         """