I'm having a problem with the sessionAsSigner object: it returns "undefined" if one of the custom controls used on an XPage is signed by another user than the XPage. This is annoying (at the least) if you're working with multiple users on the same application.
Has anyone else experienced this? Or can anyone tell me if this is "by design"?
I have also experienced this.
My guess is that it is 'as designed' as the renderer would have no sure way to know who the signer actually is when presented with two or more signing signatures.
Best practice is to always sign the entire application before testing or pushing to production with a signing ID.
I've seen HTTP 500 errors with two signers. It is one of the reasons in my mind when looking at source control and working on a local server.
Equally I think there are problems with two Java classes that use sessionAsSigner. I've found that when I had that, things were fine for a while, but after about half an hour the server crashed. I couldn't see anything in the NSD logs to certainly point to that, but was able to reproduce it. And when I signed the database, I had no problems.
Related
Dear Stackoverflow people,
I am facing the following problem:
For an internship in a company I have created a leaflet map with several custom features such as custom popups, markerstyle etc. The thing is, in the end they are supposed to manage the whole thing. Since they don´t know anything about code they asked for the easiest possible way for them to add data to the map.
So I came across the serverside tutorial by CodingTrain using Node.js and thought its perfect for me. Now I created basically a webform that takes up all information, converts it into a geoJSON feature, stores it in a database and sends it to the map to be displayed, great easy GUI to add new features...
Now comes the bummer which I didnt know would be a problem: The website is on a hosted service called Bitrix. I uploaded my project and it does not recognize the routes and cant write to the database or anything. I actually dont know whether I can run node on this platform?
I had the idea to launch the whole thing on a Service like Heroku or Glitch and just take the map from there and include it into the other website via an Iframe or something like that. Do you guys think thats feasible? Are there any other better ways?
Sorry for my obvious cluelessness but I´m completely new to serverside programming and thought I´d found an easy way out... I am grateful for any kind of suggestions or help!
So I've been looking around for answers but haven't been able to find any up to date solutions to my problem. So my use case is pretty simple, I want to be able to check the online status of a list of users at my organisation using Skype for Business. Opening chats with them is simple enough, but actually getting the online status has shown to be a challenge.
I've been looking into the SDK but it seems a bit over the top for my use case, and I haven't been able to get web ticket authentication working (I'm implementing this in an Electron app). Even if I got that far, would I have to make an account with specifically only the contacts I need added and use that as authentication?
Sorry if this is a stupid question, but it seems like the SDK/API is a bit over my level and I'm missing something. Do I need to add in my own server middleware between the node/electron-app and their API or something similar maybe?
Any help is greatly appreciated.
I would like to implement the following use case as a Chrome extension:
user visits gmail
exension checks current email body for a keyword
if a keyword is present, a gmail filter is added and saved (adding label, archiving, the details are not important here)
The first part sounds easier: there is gmail API to work with and even a gmail.js project that should make it easier.
Adding filter seems to be much harder. There is email settings API doing precisely what I want but I am fairly sure it is usable only by business accounts (custom email domains, won't work for gmail.com). I want the solution to be more universal.
One thing I thought of was to use browser automation - upon seeing the trigger keyword, the script automatically clicks 'Add filter' link, waits for AJAX, sets filter parameters and confirms.
An example of simulated user activity is in this answer
This could happen either on gmail page behind the popup ('Please wait, adjusting filters') or in background tab to keep it from interfering with user's flow. This seems like ugly workaround for me, though.
Is there a more straightforward or simply better approach that I'm missing?
After more experimentation and reviving an older github project I found out that setting the filter for a logged in user can be achieved simply by issuing a specific POST message to gmail from the current session.
I don't fully understand the parameters used in this request (if anyone has better information, please share), but I found a sample code which was greatly helpful.
Second issue, widely discussed in gmail.js community, is that Gmail security policies will prevent you from injecting your own scripts. This is bypassed by method shown in this boilerplate project
I compiled these solutions to solve my particular use case. Here is an example project with my solution, which should work out of the box - and when in doubt, see readme.
I needed to build an XPages to get the users' calendar entries for both public and private. And I could achieve this enhancement with using sessionAsSignerWithFullAccess in SSJS.
However my code doesn't work in XPiNC in Notes/Domino 9. It seems that sessionAsSignerWithFullAccess doesn't work as I expected and access only public documents.
Are there any way to resolve this issue?
Btw, I've also tried to call the Lotusscript agent in beforePageLoad, which is behalf of administrator and web access user, but no luck. Lotusscript also access only public documents.
Any suggestions would be very much appreciated!
Thank you in advance.
I believe it's the case that the sessionAsSigner sessions run as the current user when using XPiNC, rather than the signer of the XPage. Inconvenient as this is, it makes sense from a security perspective: while a Domino server has free reign to act as any name it likes, a Notes client acts solely as the active ID. Normal XPiNC setups run everything from the local client, so, from a security perspective, it's the same as accessing non-XPage elements.
You could double-check to see if my thinking is accurate by outputting sessionAsSignerWithFullAccess.getEffectiveUserName(). If I'm right, it will be the currently-running user, not the signer.
One way around it would be setting the XPiNC apps to execute on the server (new in 9, I believe). It has some caveats (https://frostillic.us/f.nsf/posts/how-i-got-xpinc-run-on-server-with-sso-working), but it has a lot of advantages both from a performance and a predictability perspective: since the app is actually running on the server in basically the same way as it would in a web browser, it (likely) also supports sessionAsSigner.
I'm trying to search for users in the user manager window and I'm not getting any results. For example "admin" is a existing user but it doesn't return any result. Do you have any ideas?
Note: Role Manager works fine
Cheers
Are you sure it's not working? I know this might seem like a silly question but with large amounts of users, I've seen the user manager search be quite slow in returning results (and you don't really get a visual cue that it's actually working).
I've also seen this behavior when using "switcher" technology for my userbase.
Am not aware of any fixes unfortunately, sorry.