Pdf is successfully stored only when using "Admin profile", when using profile "MyProfileName" objet is created but the pdf is note stored in database.
Last edit: Benjamin LAURENCE 2024-02-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you also share the whole MyNewClass definition ? Might be blocking elsewhere...
By the way, are there anything in the log/error.log file when creating with a non admin profile ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When using admin profile "report" : Object is created and attribute "report" is correctly defined
When using created profile : Object is created and attribute "report" is not setted
Do you know if there is "restriction" on non admin user reading file on disk ?
Glad to hear your problem is solved !
What class needs to be used when getting or setting an object isn't very clear for now, we didn't document it very well for now. Best it to look for other code samples O:)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
When creating new Class (Say "MyNewClass") having field Attribute "AttributeBlob",
In that same class :
Created profile for that Class :
Pdf is successfully stored only when using "Admin profile", when using profile "MyProfileName" objet is created but the pdf is note stored in database.
Last edit: Benjamin LAURENCE 2024-02-09
Hello,
Can you check the grant matrix (Administration, Profiles, open the profile, grant matrix tab) of the profile you created ?
Can you also share the whole MyNewClass definition ? Might be blocking elsewhere...
By the way, are there anything in the log/error.log file when creating with a non admin profile ?
Hi pierre,
Thank you for your help.
Matrix definition in 1.png
I added :
but i have no error when using created profile :
When using admin profile "report" : Object is created and attribute "report" is correctly defined
When using created profile : Object is created and attribute "report" is not setted
Do you know if there is "restriction" on non admin user reading file on disk ?
Hello,
You might want to try :
- setting an absolute path instead of a relative path
- set an ormDocument instead of just a path
Hello,
Same "problem" when saving pdf to disk and sending absolute path.
But using ormDocument all is ok !!!!
Thank you for your help.
Glad to hear your problem is solved !
What class needs to be used when getting or setting an object isn't very clear for now, we didn't document it very well for now. Best it to look for other code samples O:)
That's ok, i wasn't aware of "ormDocument" class (Thank you again) so i looked in the github project and the usage is quite simple.
I think it should be docummented, maybe here : https://www.itophub.io/wiki/page?id=3_1_0:customization:actions-on-transitions in section "Set"
The Set action in transition is just an indirection to DBObject::Set
I've updated some phpdoc, it will be there next time O:) (but there is still work to do in order to be exhaustive)
https://github.com/Combodo/iTop/commit/f6fec506b18f20578f3c9ff37889461bcbc08ee3