[gen] First version of a Ogone Appy plug-in.
This commit is contained in:
parent
178059ba1b
commit
b2e1e8c780
10 changed files with 197 additions and 11 deletions
|
@ -1020,10 +1020,13 @@ class ToolMixin(BaseMixin):
|
|||
url = appyUser.o.getUrl(mode='edit', page='main', nav='')
|
||||
return (' | '.join(info), url)
|
||||
|
||||
def getUserName(self, login):
|
||||
'''Gets the user name corresponding to p_login, or the p_login itself
|
||||
if the user does not exist anymore.'''
|
||||
user = self.appy().search1('User', noSecurity=True, login=login)
|
||||
def getUserName(self, login=None):
|
||||
'''Gets the user name corresponding to p_login (or the currently logged
|
||||
login if None), or the p_login itself if the user does not exist
|
||||
anymore.'''
|
||||
tool = self.appy()
|
||||
if not login: login = tool.user.getId()
|
||||
user = tool.search1('User', noSecurity=True, login=login)
|
||||
if not user: return login
|
||||
firstName = user.firstName
|
||||
name = user.name
|
||||
|
|
|
@ -1594,4 +1594,9 @@ class BaseMixin:
|
|||
if not parent: # Is propably being created through code
|
||||
return False
|
||||
return parent.getId() == 'temp_folder'
|
||||
|
||||
def onProcess(self):
|
||||
'''This method is a general hook for transfering processing of a request
|
||||
to a given field, whose name must be in the request.'''
|
||||
return self.getAppyType(self.REQUEST['name']).process(self)
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue