UNPKG

@harishreddym/baqend

Version:

Baqend JavaScript SDK

3,407 lines (995 loc) 52.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Baqend JavaScript SDK 2.14.1 - Class: Acl</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico"> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/bootstrap-baqend.min.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> <link type="text/css" rel="stylesheet" href="styles/font-awesome-4.7.0.css"> </head> <body> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="navbar-inner container"> <!-- Collapsed navigation --> <div class="navbar-header"> <!-- Expander button --> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <!-- Main title --> <a class="navbar-brand" href="/"><img src="img/logo.png"></a> </div> <!-- Expanded navigation --> <div id="nav" class="navbar-collapse collapse"> <!-- Search --> <form class="navbar-right form-inline search-form"> <div class="form-group search-form-group"> <input type="search" class="form-control search-input" id="search-query" placeholder="Search Guide" name="q" autocomplete="off"> <div id="search-results" class="search-results"> <p class="search-no-results">Please enter a search query ...</p> </div> <i class="search-icon fa fa-search"></i> </div> </form> <!-- Main navigation --> <ul class="nav navbar-nav"> <li> <a href="https://dashboard.baqend.com/">Dashboard</a> </li> <!-- Guide Navigation --> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Guide <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="https://www.baqend.com/guide/">Home</a></li> <li><a href="https://www.baqend.com/guide/#speed-kit">Speed Kit</a></li> <li><a href="https://www.baqend.com/guide/#platform">Platform</a></li> <li><a href="https://www.baqend.com/guide/roadmap/">Roadmap</a></li> <li><a href="https://www.baqend.com/guide/topics/faq/">FAQ</a></li> </ul> </li> <!-- Starter Kits --> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Starter Kits <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="https://www.baqend.com/guide/starter-kits/">Starter Kits Overview</a></li> <li><a href="https://www.baqend.com/guide/starter-kits/angular2/">Angular 2 Starter Kit</a></li> <li><a href="https://www.baqend.com/guide/starter-kits/react/">React and Redux Starter Kit</a></li> <li><a href="https://www.baqend.com/guide/starter-kits/bootstrap/">Bootstrap Starter Kit</a></li> <li><a href="https://www.baqend.com/guide/starter-kits/ionic2/">Ionic 2 Starter Kit</a></li> <li><a href="https://www.baqend.com/guide/starter-kits/ionic/">Ionic Starter Kit</a></li> </ul> </li> <li class="active"> <a href="baqend.html">JS API</a> </li> <li> <a href="https://www.baqend.com/tutorial.html">Tutorial</a> </li> </ul> </div> </div> </nav> <div class="box gray pt-32 pb-32"> <div class="container"> <div class="row"> <!-- <div class="col-md-3"></div> --> <div class="bs-sidebar hidden-print fixed affix" role="complementary"> <input class="filter form-control input-sm" type="text" placeholder="FILTER"/> <ul class="nav bs-sidenav"> <li class="active"><a href="Acl.html" class="nav-name">Acl</a></li> <li class=""><a href="EntityManager.html" class="nav-name">EntityManager</a></li> <li class=""><a href="EntityManagerFactory.html" class="nav-name">EntityManagerFactory</a></li> <li class=""><a href="GeoPoint.html" class="nav-name">GeoPoint</a></li> <li class=""><a href="RealtimeEvent.html" class="nav-name">RealtimeEvent</a></li> <li class=""><a href="baqend.html" class="nav-name">baqend</a></li> <li class=""> <a href="binding.html" class="nav-name">binding</a> <ul class="nav"> <li class=""><a href="binding.Accessor.html" class="nav-name">Accessor</a></li> <li class=""><a href="binding.DeviceFactory.html" class="nav-name">DeviceFactory</a></li> <li class=""><a href="binding.Enhancer.html" class="nav-name">Enhancer</a></li> <li class=""><a href="binding.Entity.html" class="nav-name">Entity</a></li> <li class=""><a href="binding.EntityFactory.html" class="nav-name">EntityFactory</a></li> <li class=""><a href="binding.Factory.html" class="nav-name">Factory</a></li> <li class=""><a href="binding.File.html" class="nav-name">File</a></li> <li class=""><a href="binding.FileFactory.html" class="nav-name">FileFactory</a></li> <li class=""><a href="binding.Managed.html" class="nav-name">Managed</a></li> <li class=""><a href="binding.ManagedFactory.html" class="nav-name">ManagedFactory</a></li> <li class=""><a href="binding.Role.html" class="nav-name">Role</a></li> <li class=""><a href="binding.User.html" class="nav-name">User</a></li> <li class=""><a href="binding.UserFactory.html" class="nav-name">UserFactory</a></li> </ul> </li> <li class=""> <a href="caching.html" class="nav-name">caching</a> <ul class="nav"> <li class=""><a href="caching.BloomFilter.html" class="nav-name">BloomFilter</a></li> </ul> </li> <li class=""> <a href="connector.html" class="nav-name">connector</a> <ul class="nav"> <li class=""><a href="connector.Connector.html" class="nav-name">Connector</a></li> <li class=""><a href="connector.FetchConnector.html" class="nav-name">FetchConnector</a></li> <li class=""><a href="connector.IFrameConnector.html" class="nav-name">IFrameConnector</a></li> <li class=""><a href="connector.Message.html" class="nav-name">Message</a></li> <li class=""><a href="connector.NodeConnector.html" class="nav-name">NodeConnector</a></li> <li class=""><a href="connector.ObservableStream.html" class="nav-name">ObservableStream</a></li> <li class=""><a href="connector.WebSocketConnector.html" class="nav-name">WebSocketConnector</a></li> <li class=""><a href="connector.XMLHttpConnector.html" class="nav-name">XMLHttpConnector</a></li> <li class=""><a href="connector.ChannelMessage.html" class="nav-name">ChannelMessage</a></li> </ul> </li> <li class=""> <a href="error.html" class="nav-name">error</a> <ul class="nav"> <li class=""><a href="error.CommunicationError.html" class="nav-name">CommunicationError</a></li> <li class=""><a href="error.EntityExistsError.html" class="nav-name">EntityExistsError</a></li> <li class=""><a href="error.IllegalEntityError.html" class="nav-name">IllegalEntityError</a></li> <li class=""><a href="error.PersistentError.html" class="nav-name">PersistentError</a></li> <li class=""><a href="error.RollbackError.html" class="nav-name">RollbackError</a></li> </ul> </li> <li class=""> <a href="metamodel.html" class="nav-name">metamodel</a> <ul class="nav"> <li class=""><a href="metamodel.Attribute.html" class="nav-name">Attribute</a></li> <li class=""><a href="metamodel.BasicType.html" class="nav-name">BasicType</a></li> <li class=""><a href="metamodel.CollectionAttribute.html" class="nav-name">CollectionAttribute</a></li> <li class=""><a href="metamodel.DbIndex.html" class="nav-name">DbIndex</a></li> <li class=""><a href="metamodel.EmbeddableType.html" class="nav-name">EmbeddableType</a></li> <li class=""><a href="metamodel.EntityType.html" class="nav-name">EntityType</a></li> <li class=""><a href="metamodel.ListAttribute.html" class="nav-name">ListAttribute</a></li> <li class=""><a href="metamodel.ManagedType.html" class="nav-name">ManagedType</a></li> <li class=""><a href="metamodel.MapAttribute.html" class="nav-name">MapAttribute</a></li> <li class=""><a href="metamodel.Metamodel.html" class="nav-name">Metamodel</a></li> <li class=""><a href="metamodel.ModelBuilder.html" class="nav-name">ModelBuilder</a></li> <li class=""><a href="metamodel.PluralAttribute.html" class="nav-name">PluralAttribute</a></li> <li class=""><a href="metamodel.SetAttribute.html" class="nav-name">SetAttribute</a></li> <li class=""><a href="metamodel.SingularAttribute.html" class="nav-name">SingularAttribute</a></li> <li class=""><a href="metamodel.Type.html" class="nav-name">Type</a></li> </ul> </li> <li class=""> <a href="model.html" class="nav-name">model</a> <ul class="nav"> <li class=""><a href="model.Device.html" class="nav-name">Device</a></li> <li class=""><a href="model.Role.html" class="nav-name">Role</a></li> <li class=""><a href="model.User.html" class="nav-name">User</a></li> </ul> </li> <li class=""> <a href="partialupdate.html" class="nav-name">partialupdate</a> <ul class="nav"> <li class=""><a href="partialupdate.EntityPartialUpdateBuilder.html" class="nav-name">EntityPartialUpdateBuilder</a></li> <li class=""><a href="partialupdate.PartialUpdateBuilder.html" class="nav-name">PartialUpdateBuilder</a></li> <li class=""><a href="partialupdate.UpdateOperation.html" class="nav-name">UpdateOperation</a></li> </ul> </li> <li class=""> <a href="query.html" class="nav-name">query</a> <ul class="nav"> <li class=""><a href="query.Builder.html" class="nav-name">Builder</a></li> <li class=""><a href="query.Filter.html" class="nav-name">Filter</a></li> <li class=""><a href="query.Node.html" class="nav-name">Node</a></li> <li class=""><a href="query.Operator.html" class="nav-name">Operator</a></li> <li class=""><a href="query.Query.html" class="nav-name">Query</a></li> <li class=""><a href="query.Stream.html" class="nav-name">Stream</a></li> <li class=""><a href="query.Condition.html" class="nav-name">Condition</a></li> </ul> </li> <li class=""> <a href="util.html" class="nav-name">util</a> <ul class="nav"> <li class=""><a href="util.Code.html" class="nav-name">Code</a></li> <li class=""><a href="util.Lockable.html" class="nav-name">Lockable</a></li> <li class=""><a href="util.Logger.html" class="nav-name">Logger</a></li> <li class=""><a href="util.Metadata.html" class="nav-name">Metadata</a></li> <li class=""><a href="util.Modules.html" class="nav-name">Modules</a></li> <li class=""><a href="util.Permission.html" class="nav-name">Permission</a></li> <li class=""><a href="util.PushMessage.html" class="nav-name">PushMessage</a></li> <li class=""><a href="util.TokenStorage.html" class="nav-name">TokenStorage</a></li> <li class=""><a href="util.ValidationResult.html" class="nav-name">ValidationResult</a></li> <li class=""><a href="util.Validator.html" class="nav-name">Validator</a></li> <li class=""><a href="util.TokenStorageFactory.html" class="nav-name">TokenStorageFactory</a></li> </ul> </li> </ul> </div> <div class="col-md-12" id="main"> <div class="content"> <h1 class="page-title">Class: Acl</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>Acl<span class="signature">(metadata<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2> <div class="class-description"><p>Creates a new Acl object, with an empty rule set for an object</p></div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="Acl"><span class="type-signature"></span>new Acl<span class="signature">(metadata<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>metadata</code></td> <td class="type"> <span class="param-type"><a href="util.Metadata.html">util.Metadata</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>the metadata of the object, null for files</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line9">line 9</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="read"><span class="type-signature">(readonly) </span>read<span class="type-signature"> :<a href="util.Permission.html">util.Permission</a></span></h4> <div class="description"> <p>The read permission of the object</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="util.Permission.html">util.Permission</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line19">line 19</a> </li></ul></dd> </dl> <h4 class="name" id="write"><span class="type-signature">(readonly) </span>write<span class="type-signature"> :<a href="util.Permission.html">util.Permission</a></span></h4> <div class="description"> <p>The write permission of the object</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="util.Permission.html">util.Permission</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line25">line 25</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="allowReadAccess"><span class="type-signature"></span>allowReadAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Allows the given user or rule to read the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role to allow</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line96">line 96</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="allowWriteAccess"><span class="type-signature"></span>allowWriteAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Allows the given user or rule to write the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role to allow</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line169">line 169</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="clear"><span class="type-signature"></span>clear<span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Removes all acl rules, read and write access is public afterwards</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line33">line 33</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="copy"><span class="type-signature"></span>copy<span class="signature">(acl)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Copies permissions from another ACL</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>acl</code></td> <td class="type"> <span class="param-type"><a href="Acl.html">Acl</a></span> </td> <td class="description last"><p>The ACL to copy from</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line44">line 44</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="deleteReadAccess"><span class="type-signature"></span>deleteReadAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Deletes any read allow/deny rule for the given user or role</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line118">line 118</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="deleteWriteAccess"><span class="type-signature"></span>deleteWriteAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Deletes any write allow/deny rule for the given user or role</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line191">line 191</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="denyReadAccess"><span class="type-signature"></span>denyReadAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Denies the given user or rule to read the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role to deny</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line107">line 107</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="denyWriteAccess"><span class="type-signature"></span>denyWriteAccess<span class="signature">(&hellip;userOrRole)</span><span class="type-signature"> &rarr; {<a href="Acl.html">Acl</a>}</span></h4> <div class="description"> <p>Denies the given user or rule to write the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="attributes"> &lt;repeatable><br> </td> <td class="description last"><p>The user or role to deny</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line180">line 180</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>this acl object</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Acl.html">Acl</a></span> </dd> </dl> <h4 class="name" id="fromJSON"><span class="type-signature"></span>fromJSON<span class="signature">(json)</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Sets the acl rules form JSON</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>json</code></td> <td class="type"> <span class="param-type">json</span> </td> <td class="description last"><p>The json encoded acls</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line214">line 214</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="isPublicReadAllowed"><span class="type-signature"></span>isPublicReadAllowed<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Gets whenever all users and roles have the permission to read the object</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line55">line 55</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> If public access is allowed</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isPublicWriteAllowed"><span class="type-signature"></span>isPublicWriteAllowed<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Gets whenever all users and roles have the permission to write the object</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line128">line 128</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> If public access is allowed</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isReadAllowed"><span class="type-signature"></span>isReadAllowed<span class="signature">(userOrRole)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Checks whenever the user or role is explicit allowed to read the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="description last"><p>The user or role to check for</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line76">line 76</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> if read access is explicitly allowed for the given user or role</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isReadDenied"><span class="type-signature"></span>isReadDenied<span class="signature">(userOrRole)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Checks whenever the user or role is explicit denied to read the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="description last"><p>The user or role to check for</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line86">line 86</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> if read access is explicitly denied for the given user or role</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isWriteAllowed"><span class="type-signature"></span>isWriteAllowed<span class="signature">(userOrRole)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Checks whenever the user or role is explicit allowed to write the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="description last"><p>The user or role to check for</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line149">line 149</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> if write access is explicitly allowed for the given user or role</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="isWriteDenied"><span class="type-signature"></span>isWriteDenied<span class="signature">(userOrRole)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Checks whenever the user or role is explicit denied to write the object</p> </div> <h5>Parameters:</h5> <table class="params table"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>userOrRole</code></td> <td class="type"> <span class="param-type"><a href="model.User.html">model.User</a></span> | <span class="param-type"><a href="model.Role.html">model.Role</a></span> | <span class="param-type">string</span> </td> <td class="description last"><p>The user or role to check for</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line159">line 159</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p><code>true</code> if write access is explicitly denied for the given user or role</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="setPublicReadAllowed"><span class="type-signature"></span>setPublicReadAllowed<span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Sets whenever all users and roles should have the permission to read the object</p> <p>Note: All other allow read rules will be removed.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line66">line 66</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="setPublicWriteAllowed"><span class="type-signature"></span>setPublicWriteAllowed<span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Sets whenever all users and roles should have the permission to write the object</p> <p>Note: All other allow write rules will be removed.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line139">line 139</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="toJSON"><span class="type-signature"></span>toJSON<span class="signature">()</span><span class="type-signature"> &rarr; {json}</span></h4> <div class="description"> <p>A JSON representation of the set of rules</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="lib_Acl.js.html">lib/Acl.js</a>, <a href="lib_Acl.js.html#line201">line 201</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">json</span> </dd> </dl> </article> </section> <!-- <footer> <strong>Baqend JavaScript SDK 2.14.1</strong><br> &copy 2019 Baqend GmbH<br> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun, 06 Jan 2019 05:00:21 GMT </footer> --> </div> </div> </div> </div> </div> <div id="footer" style="position:relative; z-index:1;"> <div class="container"> <div class="row"> <div class="col-xs-6 col-sm-3 sitemap"> <h4>Product</h4> <a href="https://www.baqend.com/platform.html">Platform</a> <a href="https://www.baqend.com/speedkit.html">Speed Kit</a> <a href="https://www.baqend.com/features.html">Features</a> <a href="https://www.baqend.com/pricing.html">Platform Pricing</a> <a href="https://www.baqend.com/pricing_speedkit.html">Speed Kit Pricing</a> <a href="https://www.baqend.com/agencies.html">Agencies</a> <a href="https://www.baqend.com/enterprise.html">Enterprise</a> <a href="https://www.baqend.com/features.html#download">Community Edition</a> <a href="https://www.baqend.com/support.html">Support</a> </div> <div class="col-xs-6 col-sm-3 sitemap"> <h4>Company</h4> <a href="https://www.baqend.com/about.html">About us</a> <a href="https://medium.baqend.com">Baqend Blog</a> <a href="https://www.baqend.com/hiring.html">Jobs</a> <a href="https://www.baqend.com/press.html">Press</a> <a href="https://thesis.app.baqend.com/">Bachelor/Master theses</a> <a href="https://www.weblabs.hamburg/">WebLabs.Hamburg</a> </div> <div class="col-xs-6 col-sm-3 sitemap"> <h4>Developer</h4> <a href="https://d