The following documents the user permission support in keystone based on the support being added via PR #2111. Permissions are based on roles. If a user has a role and the list also specifies that role for any of its CRUD operations then it is permissive for the user to perform whichever CRUD operation matches the role. All users must define, at least, one role. The following are guidelines for adding role/permission support to your application:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*so let's simplify you have | |
- your letters (all messages, yours & other peer) which you draw to DOM | |
- you have your outbox , when you say something, that the other person listens to with .on(...) | |
and adds to their letters when they arrive | |
- you listen with .on(...) the other peers messages and add them to letters when | |
they arrive | |
- on your send(){...} you would add the message to your letters | |
and to the outbox so your message can trigger the other persons .on */ | |
class Chat { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get and put encrypted material to paths in Gun | |
* FIXME: Investigate why root level put doesn't work | |
* TODO: Add signing to make objects unwritable by others | |
**/ | |
const decEnc = this.decEnc = async(...args)=> { | |
console.log(args); | |
let data = args.length > 0 ? args.shift() : false; // data as first argument | |
let pair = args.length > 0 ? args.shift() : false; // pair to use in decrypting/encrypting as second argument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//CLIENT | |
Gun.on('opt', function (ctx) { | |
if (ctx.once) { | |
return | |
} | |
this.to.next(ctx) | |
ctx.on('auth', function(msg){ | |
let to = this.to | |
clientAuth(ctx) | |
function clientAuth(ctx){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Node / Iquidus Explorer Setup for Dummies | |
Pulse Crypto is used in this example. | |
This Tutorial is going to create a Daemon (node) and install Explorer. | |
THIS IS NOT GOING TO CREATE A GUI CLIENT. | |
Follow the instructions in [whatever coin name] docs folder Unix build - some builds are different. | |
I setup this up on both Ubuntu 15.10 and 16.04 with no issues. | |
You can create an account on vultr and get $50 free to be used in 2 months. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if localStorage is supported const isSupported: boolean | |
* Check if localStorage has an Item function hasItem(key: string): boolean | |
* Get the amount of space left in localStorage function getRemainingSpace(): number | |
* Get the maximum amount of space in localStorage function getMaximumSpace(): number | |
* Get the used space in localStorage function getUsedSpace(): number | |
* Backup Assosiative Array interface Backup | |
* Get a Backup of localStorage function getBackup(): Backup | |
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true) | |
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if localStorage is supported const isSupported: boolean | |
* Check if localStorage has an Item function hasItem(key: string): boolean | |
* Get the amount of space left in localStorage function getRemainingSpace(): number | |
* Get the maximum amount of space in localStorage function getMaximumSpace(): number | |
* Get the used space in localStorage function getUsedSpace(): number | |
* Backup Assosiative Array interface Backup | |
* Get a Backup of localStorage function getBackup(): Backup | |
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true) | |
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof HTML5 == 'undefined') { | |
var HTML5 = {}; | |
} | |
/** | |
* Wrapper class to deal with easily storing values in local storage | |
* without having to constantly use JSON.parse and JSON.stringify everywhere | |
* you want to save an object. | |
* | |
* @param {String} index the base index to use in the localStorage global object | |
* @author Tom Chapman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
host = "127.0.0.1" | |
port = 4444 | |
# try and connect to a bind shell | |
try: | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect((host, port)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo wget -qO- https://toolbelt.heroku.com/install.sh | sh | |
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> .bash_profile | |
$ source .bash_profile | |
$ heroku version | |
$ heroku login | |
Enter your Heroku credentials. | |
Email: メールアドレス | |
Password (typing will be hidden): パスワード |