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
/** | |
* Copyright (c) 2019 Wouter van den Broek https://github.com/wbroek/ | |
* All rights reserved. | |
*/ | |
const axios = require('axios'); | |
const ntlm = require('./ntlm'); | |
// NODE JS | |
const https = require('https'); | |
const httpsAgent = new https.Agent({ keepAlive: true }); |
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
<template> | |
<require from="book-form"></require> | |
<book-form></book-form> | |
<div class="notification" show.bind="notification.length > 0"> | |
${notification} | |
</div> | |
</template> |
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
declare module 'geofire' { | |
import firebase from 'firebase' | |
namespace GeoFire { | |
type Dictionary<T> = { [key:string]: T } | |
type Latitude = number | |
type Longitude = number | |
type Ref = firebase.database.Reference | |
type Location = [Latitude, Longitude] | |
type CenterCriteria = {center:Location} | |
type RadiusCriteria = {radius: number} |
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
// https://gist.github.com/mikelehen/3596a30bd69384624c11 | |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). |
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 { | |
inject, noView, bindable, bindingMode, | |
customElement, BindingEngine, inlineView | |
} from 'aurelia-framework'; | |
import 'jquery'; | |
import moment from 'moment'; | |
import {fullCalendar} from 'fullcalendar'; | |
@customElement('calendar') |
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
//see reference implementation in ews-javascript-api_repo@github\test\MockXHRApi.ts, this one is transpiled JS | |
// ----- Updated to process errors in ntlm library gracefully | |
var PromiseFactory = require("ews-javascript-api").PromiseFactory; | |
var httpntlm = require('httpntlm'); | |
var ntlmXHRApi = (function () { | |
function ntlmXHRApi(user, password) { | |
this.userName = user; | |
this.password = password; | |
} | |
ntlmXHRApi.prototype.xhr = function (xhroptions) { |
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 { bindable, inlineView } from 'aurelia-framework'; | |
import * as ag from 'ag-grid'; | |
@inlineView(` | |
<template class="ag-blue" style="align-self: stretch; flex-grow: 1; -ms-flex: 0 1 auto; flex: 1 1 100%;"> | |
<require from="ag-grid/dist/ag-grid.css"></require> | |
<require from="ag-grid/dist/theme-blue.css"></require> | |
</template> | |
`) | |
export class AgGrid { |
- Mobiledoc - github.com/bustle/mobiledoc-kit - framework to build editors with a standardized JSON structure
- ShareDB - github.com/share/sharedb - framework to sync any JSON document using operational transforms, add real-time collaborative editing to anything else
- Bangle.dev - github.com/bangle-io/bangle.dev - toolkit built for building editors, based on prosemirror
These use separate document structures instead of HTML, some are more modular libraries than full editors
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
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
NewerOlder