Question Error - trying to Display Lock and Unlock Keys on Searched Doc

jack_pete

New member
Joined
Oct 3, 2015
Messages
2
Programming Experience
3-5
I am trying to Display Lock or Unlock Images on Searched Documents by passing Session.UserRights.
Not sure why my code is display just Unlock Images for all documents. Seems like my code is not able to pass UserRights Properly. Can someone please help look at my code what i am doing wrong.


Thanks








C#:
bool hasAccess = false;
                                                                if (Session.UserRights != null)
                                                                {
                                                                   if(EngineClient.UserHasAccess(Session.UserRights, doc.AccessList1, doc.AccessList2, doc.DeniedList1))
                                                                   {
                                                                      hasAccess= true;
                                                                   }
                                                                 }
                                                                 if (hasAccess = false)
                                                                {
	                                                          %>
                                                                  <img src= "./skins/_v9/formats/LockClosed.gif" style="width:16px;height:20px;padding-left:5px" title="You do not have access to the document."/>
                                                                  <%
						                }else 
                                                                {                                                              
                                                                  %>
                                                                  <img src="./skins/_v9/formats/LockOpen.gif" style="width:16px;height:20px;padding-left:5px" title="You have access to this document."/>
                                                                  <%
                                                                }
                                                                %>
 
Top Bottom