371 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
Eclipse: Compare with Each Other or Local History…
Wed, Feb 29th 2012 107
XPages: sessionAsSigner & sessionAsSignerWithFullAccess mix-up (Xpages BUG??)
Tue, Oct 25th 2011 154
XPages - Difference between xp:this.data (xp:dominoView) and xp:dataContext usage?
Tue, Mar 15th 2011 207
XPages Partial Refresh: Some day you will run into this nasty javascript issue with Internet Explorer.
Mon, Mar 14th 2011 265
Repeat Control – A better pagination (Version 8.5.1) (An Update)
Mon, Oct 25th 2010 73
Repeat Control – A better navigation (Version 8.5.1)
Thu, Oct 21st 2010 97
How to use SSJS inside the addOnLoad function?
Wed, Aug 25th 2010 87
Top 10
XPages Partial Refresh: Some day you will run into this nasty javascript issue with Internet Explorer.
Mon, Mar 14th 2011 265
XPages - Difference between xp:this.data (xp:dominoView) and xp:dataContext usage?
Tue, Mar 15th 2011 207
XPages: sessionAsSigner & sessionAsSignerWithFullAccess mix-up (Xpages BUG??)
Tue, Oct 25th 2011 154
Eclipse: Compare with Each Other or Local History…
Wed, Feb 29th 2012 107
Repeat Control – A better navigation (Version 8.5.1)
Thu, Oct 21st 2010 97
How to use SSJS inside the addOnLoad function?
Wed, Aug 25th 2010 87
Repeat Control – A better pagination (Version 8.5.1) (An Update)
Mon, Oct 25th 2010 73


XPages: sessionAsSigner & sessionAsSignerWithFullAccess mix-up (Xpages BUG??)
   

I spent around 3 days chasing a [TypeError] exception while trying to delete a document. According to the IBM documentation, sessionAsSigner works with the effective (web) access of the Xpage signer.

If my basics are not wrong, a User with Editor access should be able to delete a document even if that person's name or role or group is not in one of the authors field of the document. I logged in as me (I myself is the signer too, no other developer is working in my database) and tried to delete a document with the sessionAsSigner access. It didn't let me delete (You are not listed as one of the authors error). I have Manager access in the ACL and the "Maximum internet name & password" settings was Editor.

According to the IBM documentation, sessionAsSignerWithFullAccess should give admin access to the data (So it seems like the sessionAsSigner is not applicable to the "documents" in which case the above behavior is correct).

So I used the sessionAsSignerWithFullAccess to get the database object. Still no luck on deleting the document (same not authorized error). After a lot of trial and error, it appears to me that it is a mix-up issue between sessionAsSigner and sessionAsSignerWithFullAccess.

Here is the code for reference (the replica ids are fake)

function removeDocument() {
      var dbA=sessionAsSigner.getDatabase("","");
      dbA.openByReplicaID(@DbName()[0],"85XXXXE2005BXXXX");      
                 
      var dbB=sessionAsSignerWithFullAccess.getDatabase("","");
      dbB.openByReplicaID(@DbName()[0],"85YYYY500046YYYY");

      var vw=dbB.getView("($All)");
      var doc=vw.getFirstDocument();
      doc.remove(true);
}

If a previous code is getting a sessionAsSigner, then a subsequent attempt to access the sessionAsSignerWithFullAccess gives only a sessionAsSigner level of access.

If I change the first line of code to get the dbA from session (instead of sessionAsSigner), then the sessionAsSignerWithFullAccess on line 3 gets the full access as expected.

Has anyone faced this issue before?? I am thinking that it is a bug on the implementation of this feature. This issue was there on 8.5.2 also (We recently upgraded to 8.5.3).

The sessionAsSigner need not be in the same script to reproduce this issue. If anywhere else in the code, a sessionAsSigner is accessed before calling the delete code, the same issue happens.

---------------------
http://www.mydominolab.com/2011/10/xpages-sessionassigner.html
Oct 25, 2011
155 hits



Recent Blog Posts
107


Eclipse: Compare with Each Other or Local History…
Wed, Feb 29th 2012 5:09p   Rajeev Menon
There were several posts about how to compare different versions of your code (Xpages/Custom Control) available in the local history. But I don't remember seeing anything about comparing 2 different files (Xpages/Custom Controls/Script Libraries/Style Sheets/ any text file) within the same database or different databases in the notes community forums. Suppose something went wrong when you modified the code, but you have it working in an earlier version of your code. If you have a backup of th [read] Keywords: notes xpages blogger community database eclipse java
155


XPages: sessionAsSigner & sessionAsSignerWithFullAccess mix-up (Xpages BUG??)
Tue, Oct 25th 2011 5:09p   Rajeev Menon
I spent around 3 days chasing a [TypeError] exception while trying to delete a document. According to the IBM documentation, sessionAsSigner works with the effective (web) access of the Xpage signer. If my basics are not wrong, a User with Editor access should be able to delete a document even if that person's name or role or group is not in one of the authors field of the document. I logged in as me (I myself is the signer too, no other developer is working in my database) and tried to delet [read] Keywords: acl admin ibm xpages blogger bug database password security
207


XPages - Difference between xp:this.data (xp:dominoView) and xp:dataContext usage?
Tue, Mar 15th 2011 5:17p   Rajeev Menon
One of the useful thing I learnt at a quick glance over the book ("Mastering XPages") so far is the dataContext. In fact, I was thinking how can some complex computation be done in one place in the XPage and then reference that computed object anywhere else in the page. dataContext is just what I needed. Now that I use it extensively in my code, I kind of started thinking that the xp:this.data is also almost like a dataContext. (I may be totally wrong, but then I need someone to tell me that) [read] Keywords: ldd lotus xpages apple blogger database javascript
265


XPages Partial Refresh: Some day you will run into this nasty javascript issue with Internet Explorer.
Mon, Mar 14th 2011 6:08p   Rajeev Menon
I usually keep the client ids of the controls in a global JavaScript variable (JSON Object) so that they can be referenced in the client side JavaScript functions easily. Recently I did a dijit.Dialog popup from a XPage that worked just fine in Firefox (as always). Hoping that it should also work in the Internet Explorer, I did a test and not so surprisingly, the dialog didn't show up as a dialog. I took a copy of the database before I start messing with the code during my debugging exercise. [read] Keywords: xpages apple blogger database firefox javascript
73


Repeat Control – A better pagination (Version 8.5.1) (An Update)
Mon, Oct 25th 2010 9:27a   Rajeev Menon
This is an update on the last week's a href="http://www.mydominolab.com/2010/10/repeat-control-better-navigation.html"post/a. I made few minor changes to the pagination. The combo box with any available page of results to pick from is great, but it is a little inconvenient to always pick from the combo if the users want to go to the previous or next pages. So I added a Previous and Next actions.br /div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"br //div [read] Keywords: ibm apple blogger javascript
97


Repeat Control – A better navigation (Version 8.5.1)
Thu, Oct 21st 2010 7:25p   Rajeev Menon
div class="MsoNormal"span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"Here are few things you might need while working with Repeat Controls/span/divdiv class="MsoNormal"span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"br //span/divdiv class="MsoNormal"bspan class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"How to get the repeat contr [read] Keywords: ibm apple blogger javascript




87


How to use SSJS inside the addOnLoad function?
Wed, Aug 25th 2010 6:26p   Rajeev Menon
divSuppose you want to call a Javascript function immediately after the page is loaded on the browser. The known solution with 8.5.1 is the following./divdivbr /table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #F3F3F3; border-collapse: collapse; border: none; mso-border-alt: solid #99CCFF .5pt; mso-padding-alt: 5.75pt 5.75pt 5.75pt 5.75pt; mso-yfti-tbllook: 480;"tbodytr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;" td [read] Keywords: ibm apple blogger javascript server xml




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition