| Summary: | Make GET /patrons/{patron_id} staff only | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> | 
| Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> | 
| Status: | CLOSED FIXED | QA Contact: | Josef Moravec <josef.moravec> | 
| Severity: | normal | ||
| Priority: | P5 - low | CC: | josef.moravec, m.de.rooy, martin.renvoize, nick | 
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 | 
| Patch complexity: | Trivial patch | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Bug Depends on: | 22061 | ||
| Bug Blocks: | 22218 | ||
| Attachments: | 
              Bug 22216: Make GET /patrons/{patron_id} staff only
               Bug 22216: Make GET /patrons/{patron_id} staff only Bug 22216: Make GET /patrons/{patron_id} staff only  | 
      ||
| 
 
        
          Description
        
        
          Tomás Cohen Arazi (tcohen)
        
        
        
        
          2019-01-28 14:29:57 UTC
        
       
    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.  |