| Anonymous | Login | Signup for a new account | 2013-05-25 21:10 EDT | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Wiki | ManTweet | Repositories |
| View Issue Details [ Jump to Notes ] [ Wiki ] [ Related Changesets ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0013445 | mantisbt | api soap | public | 2011-10-27 03:54 | 2013-04-06 08:12 | ||||
| Reporter | vboctor | ||||||||
| Assigned To | vboctor | ||||||||
| Priority | normal | Severity | feature | Reproducibility | have not tried | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | 1.2.8 | ||||||||
| Target Version | 1.2.12 | Fixed in Version | 1.2.12 | ||||||
| Summary | 0013445: Add mc_login() for login and to return user data | ||||||||
| Description | Currently there is no way to get user data from a username. The user data can only be retrieved as part of issue or not information. Such data includes id, username, real name and email. The user information should include the same information, but can be extended to include other more detailed information as needed. For example, global access level, accessible projects, access for each of these projects, etc. The access level information wil be not as important, as we implement our access check apis which profiles a list of allowed actions on an issue or a project for a specific user. If the user is an administrator, it should be possible to retrieve information for other users. Otherwise, we can limit this API to only retrieve information about the current logged in user. UserData mc_user_get( $p_username, $p_password, $p_username ); UserData - AccountData - Global Access Level - etc | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
Relationships |
||||||||||||||||
|
||||||||||||||||
Notes |
|
|
rombert (developer) 2011-10-28 13:06 |
Sounds good to me. Except that I would make the retrieval by id rather than by username, for consistency reasons. |
|
vboctor (administrator) 2011-10-28 14:43 edited on: 2011-11-11 00:46 |
That means that we need to have another method to retrieve the AccountData for the logged in user. The scenario I\\\\\\\'m talking about is where the client application needs to retrieve information for the user who just logged in. We could argue that this can be achieved via: AccountData mc_login( $p_username, $p_password ); We can also have a model where we can pass in to mc_user_get() an ObjectRef that can have id or username set. I believe we do this model when reporting or updating issues. |
|
rombert (developer) 2011-10-28 17:18 |
(In reply to comment 0013445:0030100) > That means that we need to have another method to retrieve the AccountData for > the logged in user. The scenario I'm talking about is where the client > application needs to retrieve information for the user who just logged in. > > We could argue that this can be achieved via: > AccountData mc_login( $p_username, $p_password ); Right, that is clearer to me. > > We can also have a model where we can pass in to mc_user_get() an ObjectRef that > can have id or username set. I believe we do this model when reporting or > updating issues. I think we should do both, even though the implementation will likely be shared. Performing a mc_login opens the door to returning access tokens, to eliminate the need for sending a username/password on each query, and instead using soap headers ( for instance ). |
|
rombert (developer) 2011-11-08 05:02 |
As suggested in https://sourceforge.net/mailarchive/message.php?msg_id=28368791 [^] , we should return the user's timezone as part of the UserData. |
|
vboctor (administrator) 2012-06-07 04:23 |
@rombert, I've attached a patch that implements mc_login() which returns the UserData as a result. I've decided to skip mc_user_get() since I don't think it is as critical and it requires thinking through who can get information or what subset of information about other users. I've implemented the corresponding tests and verified that all tests pass. Let me know your thoughts. |
|
rombert (developer) 2012-06-07 04:49 |
The patch looks good to me. I only have a couple of notes/questions 1. There seem to be some whitespace-only changes which should not be necessary try { - $this->client->mc_enum_status( $this->userName, null); - $this->fail( "Should have failed." ); - } catch ( SoapFault $e) { - $this->assertIsLoginFailure( $e ); + try { + $this->client->mc_enum_status( $this->userName, null); + $this->fail( "Should have failed." ); + } catch ( SoapFault $e) { + $this->assertIsLoginFailure( $e ); } 2. Do we want/need to return per-process access levels in the UserData to possibly remove the need for another call to enumerating the accessible projects? |
|
vboctor (administrator) 2012-06-09 23:07 |
Relating to the extra diff, I checked and there is no extra spaces or change in the content. I originally thought it is related to removal of white spaces, but it is not the case. I also changed my editor setting to not automatically remove extra spaces. Not sure why it is showing in the diff, but given that I changed editor settings, I hope it won't show up again. As for the per project access levels, we can always add this later. I would like to consider it after thinking through the work for 0013443 |
|
(0032147) RobertPattinson (viewer) 2012-06-22 06:10 edited on: 2012-06-22 06:27 |
That means that we need to have another method to retrieve the AccountData for the logged in user. The scenario I\\\\\\\'m talking about is where the client application needs to retrieve information for the user who just logged in. thanks (rombert: removed unrelated links) |
|
grangeway (developer) 2013-04-05 17:56 |
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
Related Changesets |
|||
|
MantisBT: master-1.2.x 657c81f9
Timestamp: 2012-06-07 01:33:44 Author: vboctor [ Details ] [ Diff ] |
Fixes 0013445: Add mc_login() for login and to return user data. | ||
| mod - api/soap/mantisconnect.php | [ Diff ] [ File ] | ||
| mod - api/soap/mc_api.php | [ Diff ] [ File ] | ||
| mod - tests/soap/LoginTest.php | [ Diff ] [ File ] | ||
| mod - tests/soap/SoapBase.php | [ Diff ] [ File ] | ||
|
MantisBT: master ae27eaeb
Timestamp: 2012-06-07 01:33:44 Author: vboctor [ Details ] [ Diff ] |
Fixes 0013445: Add mc_login() for login and to return user data. | ||
| mod - api/soap/mantisconnect.php | [ Diff ] [ File ] | ||
| mod - api/soap/mc_api.php | [ Diff ] [ File ] | ||
| mod - tests/soap/LoginTest.php | [ Diff ] [ File ] | ||
| mod - tests/soap/SoapBase.php | [ Diff ] [ File ] | ||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-10-27 03:54 | vboctor | New Issue | |
| 2011-10-28 13:06 | rombert | Note Added: 0030096 | |
| 2011-10-28 13:06 | rombert | Severity | minor => feature |
| 2011-10-28 13:06 | rombert | Status | new => confirmed |
| 2011-10-28 13:06 | rombert | Description Updated | View Revisions |
| 2011-10-28 14:43 | vboctor | Note Added: 0030100 | |
| 2011-10-28 17:18 | rombert | Note Added: 0030101 | |
| 2011-11-08 05:02 | rombert | Note Added: 0030198 | |
| 2011-11-11 00:38 | vboctor | Note Edited: 0030100 | View Revisions |
| 2011-11-11 00:39 | vboctor | Note Edited: 0030100 | View Revisions |
| 2011-11-11 00:46 | vboctor | Note Edited: 0030100 | View Revisions |
| 2012-03-06 06:55 | rombert | Target Version | => 1.3.x |
| 2012-06-02 01:22 | vboctor | Relationship added | has duplicate 0013902 |
| 2012-06-05 02:11 | vboctor | Relationship added | related to 0008768 |
| 2012-06-07 03:34 | vboctor | Assigned To | => vboctor |
| 2012-06-07 03:34 | vboctor | Status | confirmed => assigned |
| 2012-06-07 04:20 | vboctor | File Added: mc_login.diff | |
| 2012-06-07 04:23 | vboctor | Note Added: 0032032 | |
| 2012-06-07 04:33 | vboctor | Summary | mc_user_get() to get user data => Add mc_login() for login and to return user data |
| 2012-06-07 04:33 | vboctor | Description Updated | View Revisions |
| 2012-06-07 04:49 | rombert | Note Added: 0032033 | |
| 2012-06-09 23:07 | vboctor | Note Added: 0032055 | |
| 2012-06-10 00:00 | vboctor | Changeset attached | => MantisBT master-1.2.x 657c81f9 |
| 2012-06-10 00:00 | vboctor | Status | assigned => resolved |
| 2012-06-10 00:00 | vboctor | Resolution | open => fixed |
| 2012-06-10 00:00 | vboctor | Fixed in Version | => 1.2.12 |
| 2012-06-11 23:00 | vboctor | Changeset attached | => MantisBT master ae27eaeb |
| 2012-06-14 06:51 | atrol | Target Version | 1.3.x => 1.2.12 |
| 2012-06-22 06:10 | RobertPattinson | Note Added: 0032147 | |
| 2012-06-22 06:27 | rombert | Note Edited: 0032147 | View Revisions |
| 2012-11-10 18:54 | dregad | Status | resolved => closed |
| 2013-04-05 17:56 | grangeway | Status | closed => acknowledged |
| 2013-04-05 17:56 | grangeway | Note Added: 0036165 | |
| 2013-04-05 19:23 | grangeway | Relationship added | related to 0015721 |
| 2013-04-06 03:40 | dregad | Status | acknowledged => closed |
| 2013-04-06 07:23 | grangeway | Status | closed => acknowledged |
| 2013-04-06 08:12 | grangeway | Status | acknowledged => closed |
| MantisBT 1.2.16dev master-1.2.x-8c2bd07 [^]
Copyright © 2000 - 2013 MantisBT Team
Time: 0.2571 seconds. memory usage: 2,903 KB |