| Anonymous | Login | Signup for a new account | 2013.05.24 01:13 CEST |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Advanced Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
| 0001023 | [Piwigo] web API | feature | have not tried | 2009.06.07 23:53 | 2011.04.17 00:12 | ||
| Reporter | mistic100 | View Status | public | ||||
| Assigned To | mistic100 | ||||||
| Priority | normal | Resolution | fixed | Platform | |||
| Status | closed | OS | |||||
| Projection | none | OS Version | |||||
| ETA | none | Fixed in Version | 2.2.1 | Product Version | 2.2.0 | ||
| Target Version | 2.2.1 | Product Build | |||||
| Summary | 0001023: new API method pwg.getInfos for admins with overall statistics | ||||||
| Description |
Should add a data with overall gallery images count in the result array (why not activated or not by a new parameter) |
||||||
| Steps To Reproduce | |||||||
| Additional Information | |||||||
| Tags | No tags attached. | ||||||
| browser | any | ||||||
| Database engine and version | |||||||
| PHP version | |||||||
| Web server | Apache 1.3.x | ||||||
| Attached Files | |||||||
|
|
|||||||
Notes |
|
|
(0004935) svn (reporter) 2011.04.03 17:59 |
[Subversion] r10022 by mistic100 on branch 2.2 -----[Subversion commit log]---------------------------------------------------- merge r10017 from trunk to 2.2 (bug:1023) |
|
(0004940) plg (manager) 2011.04.05 14:01 |
in ws_getInfos(...), replace: if ($conf['show_version'] or is_admin()) by if (is_admin()) |
|
(0004942) mistic100 (developer) 2011.04.05 14:17 |
why ? it's the same condition than in ws_getVersion... |
|
(0004943) plg (manager) 2011.04.05 14:29 |
But you show *much* more than in pwg.getVersion, you show things that are only available in the administration panel. |
|
(0004944) mistic100 (developer) 2011.04.05 14:35 edited on: 2011.04.05 14:41 |
ho... you mean all the function must be restricted to an admin usage ? If I'm right there are much than one line to change and unless the version, I don't know if it's critical information :s |
|
(0004945) plg (manager) 2011.04.05 14:41 |
Oh sorry, I didn't read your code with enough attention. It's just the $infos['version'] that is added if $conf['show_version'] or is_admin(). With its current coding, this function should be only for admins : if (!is_admin()) { return new PwgError(403, 'Forbidden'); } Or you will have to change the list of informations depending on user status and manage permissions : the number of physical albums is not interesting for non admin users, you must not return the total number of photos for a non admin user (you have to filter based on permissions). So to make things simpler, I would simply require admin rights for this method. What is the purpose of this method? (who is the audience?) |
|
(0004946) mistic100 (developer) 2011.04.05 15:00 |
ok I understand the deal. I will try to make differents results : one complete serie for admin and one limited serie for guests, user specific datas is too complicated for a very limited usage. Bassically I just want to know the number a pictures on the gallery... but It was months ago and I admit I don't remember why... |
|
(0004947) plg (manager) 2011.04.05 15:02 |
If you don't know why it's useful, I advise you to wait for the moment you remember why it's useful :-) no need add useless methods in the API. |
|
(0004948) svn (reporter) 2011.04.05 15:13 |
[Subversion] r10062 by mistic100 on branch 2.2 -----[Subversion commit log]---------------------------------------------------- merge r10061 from trunk : ws_getInfos is restrcited to admins (bug:1023) |
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group Contact |