Now that we voted to have a /public namespace for unprivileged access endpoints, the existing /patrons endpoint needs to be adapted.
Created attachment 84506 [details] [review] Bug 22216: Make GET /patrons/{patron_id} staff only This patch removes the possibility to access the patron object identified by patron_id by the patron itself, or a guarantor. It does so by removing the permissions from the spec. The tests are adjusted to remove that use case. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D
Created attachment 85059 [details] [review] Bug 22216: Make GET /patrons/{patron_id} staff only This patch removes the possibility to access the patron object identified by patron_id by the patron itself, or a guarantor. It does so by removing the permissions from the spec. The tests are adjusted to remove that use case. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works well for me, signing off
Looks good but this patch removes those lines that tested allow-owner functionality. And now we have this 'feature' but no tests?
(In reply to Marcel de Rooy from comment #4) > Looks good but this patch removes those lines that tested allow-owner > functionality. And now we have this 'feature' but no tests? The resources in /patrons/ are no longer accessible by unprivileged users. New endpoints will be added that will use it, in the /public namespace. There's uno already in master: bug 22061.
Created attachment 85319 [details] [review] Bug 22216: Make GET /patrons/{patron_id} staff only This patch removes the possibility to access the patron object identified by patron_id by the patron itself, or a guarantor. It does so by removing the permissions from the spec. The tests are adjusted to remove that use case. To test: - Apply this patch - Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Awesome work all! Pushed to master for 19.05
Change of behaviour, will not be backported to the stable 18.11.x series.