当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript MongoObservable.Collection.allow方法代码示例

本文整理汇总了TypeScript中meteor-rxjs.MongoObservable.Collection.allow方法的典型用法代码示例。如果您正苦于以下问题:TypeScript MongoObservable.Collection.allow方法的具体用法?TypeScript MongoObservable.Collection.allow怎么用?TypeScript MongoObservable.Collection.allow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在meteor-rxjs.MongoObservable.Collection的用法示例。


在下文中一共展示了MongoObservable.Collection.allow方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: loggedIn

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { Action } from '../models/action.model';

export const Activity = new MongoObservable.Collection<Action>('activity', {idGeneration: 'MONGO'});

function loggedIn() {
  return !!Meteor.user();
}

Activity.allow({
  insert: loggedIn,
  update: loggedIn,
  remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:activity.collection.ts

示例2: loggedIn

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { Todo } from '../models/todo.model';

export const Todos = new MongoObservable.Collection<Todo>('todos', {idGeneration: 'MONGO'});

function loggedIn() {
  return !!Meteor.user();
}

Todos.allow({
  insert: loggedIn,
  update: loggedIn,
  remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:todos.collection.ts

示例3: loggedIn

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { Entity } from '../models/entity.model';

export const Entities = new MongoObservable.Collection<Entity>('entities', {idGeneration: 'MONGO'});

function loggedIn() {
  return !!Meteor.user();
}

Entities.allow({
  insert: loggedIn,
  update: loggedIn,
  remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:entities.collection.ts

示例4: loggedIn

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { Version } from '../models/version.model';

export const Versions = new MongoObservable.Collection<Version>('versions', {idGeneration: 'MONGO'});

function loggedIn() {
  return !!Meteor.user();
}

Versions.allow({
  insert: function (userId, doc) {
    return true;
  },
  update: function (userId, doc) {
    return true;
  },
  remove: function (userId, doc) {
    return true;
  }
});




开发者ID:michaelb-01,项目名称:pipe,代码行数:22,代码来源:versions.collection.ts

示例5: loggedIn

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { PipeUser } from '../models/user.model';

export const PipeUsers = new MongoObservable.Collection<PipeUser>('pipeUsers', {idGeneration: 'MONGO'});

function loggedIn() {
  return !!Meteor.user();
}

PipeUsers.allow({
  insert: loggedIn,
  update: loggedIn,
  remove: loggedIn
});
开发者ID:michaelb-01,项目名称:pipe,代码行数:16,代码来源:users.collection.ts

示例6:

import { MongoObservable } from 'meteor-rxjs';
import { Meteor } from 'meteor/meteor';

import { Poem, PoemPermissions } from '../models/poem.model';
import { PoemLine } from '../models/poem-line.model';

export const Poems = new MongoObservable.Collection<Poem>('poems');

Poems.allow(PoemPermissions);
开发者ID:babyshoes,项目名称:exquisite-corpus,代码行数:9,代码来源:poems.collection.ts


注:本文中的meteor-rxjs.MongoObservable.Collection.allow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。