The Permission Checker component interacts with Novell directory services (NDS) and the WebServer to determine whether a Web user has been granted access permissions by the administrator to a particular file in a Web Server.
You can use this component to customize the Novell script pages (NSP) -based page for different users. For example, if a Web page contains hyperlinks, you can use the permission checker component to test whether a user has permissions for the target Web pages. If the user does not have the required permissions, you can omit or alter the hyperlinks to target those pages the user may not access.
Interacts with NDS and the WebServer to determine whether a particular Web user has permissions to access a file in the WebServer.
Checks whether a user has permission to access a specified file.
object.HasAccess( Filepath As String)
Boolean.
If the file does not exists, the PermissionChecker object returns FALSE.
This example gives access to the Department Policy Page to the member who has access rights, otherwise it returns "Sorry, you are not a member of this department".
<%
Set pmck = CreateObject("MSWC.PermissionChecker")
UserHasAccess = pmck.HasAccess("/private/default.htm")
If UserHasAccess
%>
<A HREF="/Department/details.htm">The Department Policy Page</A>
<% Else %>
Sorry, you are not a member of this department.
<% End If %>