Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

KnowledgeBase


Info: Error.Errors.NoAccess / Security violation while running scripts
Article TypeInfo
TitleError.Errors.NoAccess / Security violation while running scripts
<p><i>When using the read() method I get the error message: <br></i>
<pre>
   'Unhandled Exception: Error (Error.Errors.NoAccess)
   occurred in ... -- File error: Security violation on file ....'  </pre><i>What security violation is occuring and how can I avoid it?</i></p>

<p>In order to run a script that reads a file, a user needs to have Designer permissions on the folder that contains the file.  So if your web contains a script that uses the read() method, users with permissions below the Designer level will not be able utilize this script.
One way to allow users without Designer permissions to utilize such a script is to lower the security requirements on the script.  For example, you can specify that the function should operate as if users of the function had Adminstator permissions.  You lower permissions on a script by using a qualifier such as 'asAdmin' in the definition of your script.
For example, the following script cannot be utilized by users with permissions below Designer, because the script contains the read() method.

<pre>
webcall function readerFunc()
{
var fl = new File("/temp/temp2.ws");
var rd = fl.read();
return rd;
}
</pre>
But the modified script below can be run by users with permissions below Designer level, because the script is run as if it were being utilized by an Administrator of the web.

<pre>
webcall asAdmin function readerFunc()
{
var fl = new File("/temp/temp2.ws");
var rd = fl.read();
return rd;
}
</pre>
For more information see the help topic below:
http://help.westside.com/default.view?Topic=securing/sscripts
Last ReviewedFebruary 20, 2015 14:06:03

  
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us