问题
Are there any preconditions for using SessionAsSigner on Xpage? My case is quite simple. On beforePageLoad
event I call my java code where I require sessionAsSigner. I'm trying to use
ExtLibUtil.getCurrentSessionAsSigner()
but it returns null . I tried to resolve the sessionAsSigner variable with other techniques with same same result. Its always null. I have missed something here probably ...
回答1:
As 'Per Henrik Lausten' pointed in above comment, the SessionAsSigner returns proper object only and only when all design elements are signed by the same ID. I can't however imagine how this feature can be used in real life because I cant assure that all design elements are signed by the same id for next several years ...
Any database action like those mentioned below will simply break my app (or at least the sessionAsSigner relied feature):
a) administrator opens the app in designer with automatic build enabled(default in DDE, I cant really be sure that all admins disabled this feature manualy) which causes recompilation of app and potential signature update on some xpages
... or ...
b) my collegue will simply update any application part with no knowledge that all signatures must be the same to not break anything.
Any such action will cause my application stop working :-( which is rather stupid.
... or do I miss something here??
来源:https://stackoverflow.com/questions/21095363/are-there-any-preconditions-for-using-sessionassigner-on-xpage