This sample is located in \Samples\Security\Custom.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample shows how to set custom permissions to protect resources that are not described by the stock permissions in com.ms.security.permissions.
To implement custom permissions, you must do the following:
To compile the sample
Use the following command from the \Samples\Security\Custom directory to compile and install the sample:
nmake
install.bat
To run the sample
Use the following command from the \Samples\Security\Custom directory to run the sample:
start custom_permissions_app.htm
These files are used by the makefile to set the custom permissions.
Main.javaThis file is the main applet that demonstrates the security features.
SampleLib.javaThis class contains a static method that checks permissions on an item and writes the result to standard output.
SamplePermission.javaThis is a sample permission that implements IPermission; used in Main.java.
SampleRequest.javaThis file implements ISecurityRequest; used by SamplePermission.
This sample shows how to: