Author |
Message
|
ucbus1 |
Posted: Mon Nov 24, 2003 1:22 pm Post subject: [SOLVED]ListViewer-modification |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
I am trying to modify listViewer.jsp so that if a user( say manager) logs on, he/she would get a list of users he/she is authorized for. Now when the user want to transfer work item, I am trying to pop-up a window with names populated for all the users he/she is authorized for.
This is how I would like to do.
Get the current looged on user
then get personsAuthorizedFor: for the logged on user.
For each personId in personsAuthorizedFor list
get the name using persistentPerson(personID)
end for
Some how I am getting NULLs when trying to get "persistentPerson(personID)". Is there any other way?
Thanks |
|
Back to top |
|
 |
jmac |
Posted: Mon Nov 24, 2003 3:40 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Ucbus:
In order to get the name using persistentPerson(personID) the user MUST be authorized for STAFF I believe. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Nov 25, 2003 6:01 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Thanks JMAC. Do you have any idea how I can achieve the fucntionality I am aiming at.
I have "mgr1" who has diffrent users working under. When mgr1 want to tranfer a workitem to say user1, I ned to give him the list of IDs with first name and last name.
Is there any Person object which can get me all the authorized users list, and theri names?
Thanks |
|
Back to top |
|
 |
jmac |
Posted: Tue Nov 25, 2003 7:34 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
If I understand correctly you must do the following:
MGR1 must have STAFF authority
MGR1 must be authorized to each user they wish to access
From MGR1 person object you can use personsAuthorizedFor to get the UserIDs of the people, then use the persistentPerson(<userid>) to access each Person object to obtain the name.
Be aware that this may not perform well _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Nov 25, 2003 8:39 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Quote: |
Get the current looged on user
then get personsAuthorizedFor: for the logged on user.
For each personId in personsAuthorizedFor list
get the name using persistentPerson(personID)
end for |
Thanks jmac.. I am do ing the same as mentioned in my first posting. But I am getting null values for firstname when I tried to use the persistentPerson(personID). After going thru the programming guide, the guide says that
Code: |
persistentPerson(personID) will not access server |
. Is this the reason I am getting null values?
Is there any alternative way?
Thanks |
|
Back to top |
|
 |
jmac |
Posted: Tue Nov 25, 2003 10:46 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
It is my opinion that you do not have Staff Authorization for the userid that is issuing the calls on the person object. Do a person.refresh() call and I believe that will fail.
Are you certain that the user has STAFF authorization? _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
ucbus1 |
Posted: Tue Nov 25, 2003 11:25 am Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Quote: |
Staff definition
authorization
E
Create, retrieve, update, and delete staff information.
As such, it includes authorization definition
authorization.
Create, retrieve, update, and delete public and
private process instance lists, process template lists,
and worklists.
The appropriate FDL authorization keyword is
STAFF. |
If I understadn the STFAA authorization, you are talking about "Staff definiton authorization" that appears when staff is defined. Some how this is never marked "checked" for the "mgr1" role. I have asked the person who build the model, it seems like he was told by the Vendor who developed the system, not to check even for manager roles.Is there any specific reason why it is not checked? |
|
Back to top |
|
 |
jmac |
Posted: Tue Nov 25, 2003 1:10 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
This is correct, without this authorization you will not be able to issue the api calls correctly. Why you were told not to use it I do not know... but I can tell you that there is no way you will be able to do what you are trying to do unless you DO use this setting. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
ucbus1 |
Posted: Wed Nov 26, 2003 11:31 am Post subject: [solved] Listviewer-modification |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Thanks jmac.
In build time>person>authorizations> I have checked "staff definition" this generated FDL with authorization STAFF. When I imported that into workflow, I could see the names of the people. |
|
Back to top |
|
 |
|