[Bug]: add-password API is logically inverted?
Installation Method
Docker fat
The Problem
My head seems to be rejecting the grammar/logical proposition of the add-password API.
basically I wanted to set an owner password to restrict extraction (including accessibility) and disable printing..
So I use the API to set those 3 options to 'false', i.e. canPrint='false' , but the output is the opposite, i.e. canPrint=false means you can print..
Notably the webfront end (http://localhost:8080/add-password?lang=en_GB) has the terms grammatically the other way around 'preventPrinting' etc.. and I wonder if that just needs propogating to the API?
Version of Stirling-PDF
0.45.6
Last Working Version of Stirling-PDF
No response
Page Where the Problem Occurred
'http://localhost:8080/api/v1/security/add-password
Docker Configuration
Relevant Log Output
Additional Information
No response
Browsers Affected
No response
No Duplicate of the Issue
- [x] I have verified that there are no existing issues raised related to my problem.
you are correct i will fix API description/naming in next release!
can you provide a screenshot
No problems,
Here is the main UI add password page (http://localhost:8080/add-password?lang=en_GB):
Here is the API documentation
(Note the inversion of verbiage) And with the API, true/false have the opposite effect to that expected,
i.e. canPrint = true actually creates a PDF you cannot print.
Hi @Abhijeet213, @Frooodle,
I noticed there’s already a PR open however would you mind if I also take a shot at this issue? I noticed the current pull request might need some improvements, and I’d like to try implementing a solution myself.
I think what was already done is not necessary bad but needs some more work at AddPasswordRequest/add-password.html to actually reflect all changes not just in controller but also in the API/Front-end
Please let me know if that’s alright.
Thanks in advance! :)
PR has only been open 3 days, I don't want to deminnish their work and research into it even if you can also resolve it I have already added a comment in PR https://github.com/Stirling-Tools/Stirling-PDF/pull/3427 As I too believe that it is missing some issues Ideally we would keep language of UI same, since we want to avoid re-translations and instead change variable naming and other system parameters to fix this
Id say wait 4 more days before assuming its stale and picking issue up unless @Abhijeet213 comes back and hands over
I Haven't Changed UI And I don't understand why '!(not)' operator is there after going through full project
For Mean Time - I'm working on error checking and other improvement and need some time..
Hi @Balazs-Szucs ,
You can definitely try this issue from your side No Prob....♾️
- Abhijeet