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
var msg = 'hello world'; | |
function doSomething(){ | |
var msg = 'foo'; | |
function inner(){ | |
return msg; | |
} | |
return inner(); | |
} | |
expect(msg).toEqual('hello world'); |
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
<html> | |
<div class="MyMedia"> | |
<img class="MyMedia-left" src="https://avatars3.githubusercontent.com/u/1256409?v=3&s=460" /> | |
<div class="MyMedia-right"> | |
<h1 class="MyMedia-h1">Beer me</h1> | |
<p>Flexitarian bitters Pitchfork tofu, PBR synth taxidermy sartorial artisan. Banksy letterpress direct trade polaroid fingerstache. Yr organic VHS, fixie gluten-free scenester ethical Williamsburg</p> | |
<p class="MyMedia-more">More...</p> | |
</div> | |
</div> | |
</html> |
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
<html> | |
<body class="Page-outer"> | |
<div class="Page-inner"> | |
<header class="PageHeader"> | |
<h1 class="PageHeader-h1">Foo meets Baz in a Bar...</h1> | |
</header> | |
<section class="PageLayout-content"> | |
<h1>HTML Ipsum Presents</h1> | |
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, <code>commodo vitae</code>, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p> |
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
Promise.all(this.routes.filter(route => !!route).map(route => new Promise((resolve, reject) => this.context.executeAction(route.data, state, () => resolve())).then(() => callback(null)); |
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
import React, { PropTypes } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Observable, Subject } from 'rxjs/Rx'; | |
const stateEmitter = new Subject(); | |
const state$ = Observable.from(stateEmitter); | |
const sendEvent = (data) => () => { | |
stateEmitter.next({ |
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
function one(){ | |
console.log('do one'); | |
} | |
function two(){ | |
console.log('do two'); | |
} | |
function three(){ | |
console.log('do three'); |
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
const Switch = (props) => <span>{props.children}</span>; | |
const Case = (props) => props.expr && props.children; | |
function TestSwitch() { | |
const val = 3; | |
return ( | |
<Switch> | |
<Case expr={val === 1}> |
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
const Switch = (props) => <span>{props.children}</span>; | |
const Case = (props) => props.expr && props.children; | |
const TestInstantiated = (props) => { | |
console.log(`${props.id}: I was rendered`); | |
return <div>{props.id}</div>; | |
} | |
function TestSwitch() { | |
const val = 3; |
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
import React, { Component } from 'react'; | |
import './App.css'; | |
const SORT_UP = 'up'; | |
const SORT_DOWN = 'down'; | |
function alphanumeric(a,b){ | |
if(a === b){ return 0; } | |
return a > b ? 1 : 0; | |
} |
OlderNewer