Are there any preconditions for using SessionAsSigner on Xpage?

我的梦境 提交于 2019-12-24 04:48:09

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!