Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Code in __Init function in my Orphaned MyNewTab (Personal)
Ponpriya_balawubramanian
I have Orphaned HOME : HomeRequestHandler : Home Tab RequestHanlder : Personal in my module as MyNewTab.New Personal menu Item is working fine.Now when in MyNewTab 's function __Init I am writing the below codeif (.fPrgCtx.USession().fUserID == 1000)endThis code does'nt work and when I unlocked the my module debugger comes forward to show as written below ( with the line if (.fPrgCtx.USession().fUserID == 1000) highlighted)0 'USession' 1 ?Whats the solution?
Find more posts tagged with
Comments
eLink User
Message from Nair, Krishnankutty [Contractor] via eLinkWithout understanding too much if (.fPrgCtx.USession().fUserID == 1000)means that the code is expecting a login of the user 'Admin' (select *from kuaf where id=1000) .Are you running as user Admin or did you loginas Admin ?Usession stack means that its is undefined or you do not havea user session.What kind of dev env do you have? 9.5sp1 with or withoutdir svcs ?Could you post the whole module here ?What is the intention of the code?-----Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: Thursday, September 14, 2006 2:32 AMTo: eLink RecipientSubject: Code in __Init function in my Orphaned MyNewTab (Personal)Code in __Init function in my Orphaned MyNewTab (Personal)Posted by Balawubramanian, Ponpriya on 09/14/2006 03:27 AMI have Orphaned HOME : HomeRequestHandler : Home Tab RequestHanlder :Personal in my module as MyNewTab.New Personal menu Item is working fine.Now when in MyNewTab 's function __Init I am writing the below codeif (.fPrgCtx.USession().fUserID == 1000) endThis code does'nt work and when I unlocked the my module debugger comesforward to show as written below ( with the line if(.fPrgCtx.USession().fUserID == 1000) highlighted)0 'USession' 1 ?Whats the solution?[To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303Livelink
Server:
https://knowledge.opentext.com/knowledge/llisapi.dllTo
Unsubscribe from this Discussion, send an e-mail tounsubscribe.development@elinkkc.opentext.com.-----------------------------------------*Please note my E-Mail Address has changed. Please update yourcontact list*Anadarko Confidentiality Notice: This electronic transmission and any attached documents or otherwritings are intended only for the person or entity to which it isaddressed and may contain information that is privileged,confidential or otherwise protected from disclosure. If you havereceived this communication in error, please immediately notifysender by return e-mail and destroy the communication. Anydisclosure, copying, distribution or the taking of any actionconcerning the contents of this communication or any attachments byanyone other than the named recipient is strictly prohibited.
Ponpriya_balawubramanian
Yes you are right. I want that if user 'Admin' is logged in, then some functionality should run otherwise that piece of code dont need to run.Now what the actual situation is that 'HOME : HomeRequestHandler : Home Tab RequestHanlder : Personal 'is Orphaned in my module as 'PersonalWorkspaceAsExpdtReqTab' which has child 'AssignmentExpTab' who has a script __Init, which contains the codeif .fEnabled && IsDefined( .fHomeOrder ) $Home.HomeUtils.Add( this ) // this code is adding an Item to Personal Menu. If we comment this code Item will not be added to Personal Menu.endAbove code adds an Item to Personal Menu and users can see it in Personal Menu. Now I want if the user logged in is 'Admin' he should be able to see that Personal Menu Item. If there is any other user he should not be able to see that item.Now strange thing for me is that .fPrgCtx.USession().fUserIDreturns current logged in User when I call it (.fPrgCtx.USession().fUserID) in other script but only Its not working in _Init script. Why is that? Answer to your questions:I logged in as User 'Admin'. I also used another user but same situation.I am using Livelink 9.5 SP1 without Directory Services. Development Environment is Livelink Builder.At the moment Module is not with me at this Computer. If you still need it I can send you later.
Hans Stoop
Message from Hans Stoop via eLink The __Init function is executed once at Livelink startup time and notwhen the a request is executed. At that time, no current user is definedyet.What you want to establish is not possible in this way.Hans> -----Original Message-----> From: eLink Discussion: Development Discussion > [mailto:development@elinkkc.opentext.com] > Sent: donderdag 14 september 2006 9:32> To: eLink Recipient> Subject: Code in __Init function in my Orphaned MyNewTab (Personal)> > Code in __Init function in my Orphaned MyNewTab (Personal)> Posted by Balawubramanian, Ponpriya on 09/14/2006 03:27 AM> > I have Orphaned HOME : HomeRequestHandler : Home Tab > RequestHanlder : Personal in my module as MyNewTab.> > New Personal menu Item is working fine.> Now when in MyNewTab 's function __Init I am writing the below code> > if (.fPrgCtx.USession().fUserID == 1000) end> > This code does'nt work and when I unlocked the my module > debugger comes forward to show as written below ( with the > line if (.fPrgCtx.USession().fUserID == 1000) highlighted)> > 0 'USession' > 1 ?> > > Whats the solution?> > [To reply to this thread, use your normal E-mail reply function.]> > ============================================================> > Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/llisapi.dll/open/786303>
; > Livelink Server:>
https://knowledge.opentext.com/knowledge/llisapi.dll>
; > To Unsubscribe from this Discussion, send an e-mail to > unsubscribe.development@elinkkc.opentext.com.> > >