Realtime Cloud Storage

Policy

Defines a set of rules that control access to the Storage database.

Properties

Object database

Rules regarding the use of operations

Object tables

Rules regarding the access to tables and their keys.

Sample

var policy = {
	database: {
		// permission to list all tables
		listTables: ["*"],
		// permission to create tables
		createTable : true,
		// permission only to update (throughput) table named 'SampleUser'
		updateTable : ["SampleUser"]
	},
	tables: {
		Admin: { 
			// permission only for read operations (getItem, listItems, ...) over table 'Admin'
			allow: "R" 
		},
		SampleUser:  { 
			// permission read and insert operations (getItem, listItems, setItem) over table 'SampleUser'
			allow: "CR" 
		},
	}
};