This commit is contained in:
thosakwe 2017-02-28 17:21:36 -05:00
parent deff36ad36
commit e489525887
8 changed files with 8 additions and 8 deletions

View file

@ -1,5 +1,5 @@
# security
[![version 0.0.7](https://img.shields.io/badge/pub-v0.0.7-red.svg)](https://pub.dartlang.org/packages/angel_security)
[![version 1.0.0](https://img.shields.io/badge/pub-v1.0.0-red.svg)](https://pub.dartlang.org/packages/angel_security)
[![build status](https://travis-ci.org/angel-dart/security.svg)](https://travis-ci.org/angel-dart/security)
Angel middleware designed to enhance application security by patching common Web security

View file

@ -1,7 +1,7 @@
import 'package:angel_framework/angel_framework.dart';
/// Adds the authed user to `e.params`, only if present in `req.injections`.
HookedServiceEventListener addUserToParams({String as, String userKey}) {
HookedServiceEventListener addUserToParams({String as, userKey}) {
return (HookedServiceEvent e) {
var user = e.request?.grab(userKey ?? 'user');

View file

@ -11,7 +11,7 @@ import 'is_server_side.dart';
HookedServiceEventListener associateCurrentUser(
{String idField,
String ownerField,
String userKey,
userKey,
String errorMessage,
bool allowNullUserId: false,
getId(user),

View file

@ -10,7 +10,7 @@ import 'is_server_side.dart';
HookedServiceEventListener queryWithCurrentUser(
{String as,
String idField,
String userKey,
userKey,
String errorMessage,
bool allowNullUserId: false,
getId(user)}) {

View file

@ -4,7 +4,7 @@ import 'is_server_side.dart';
/// Restricts the service method to authed users only.
HookedServiceEventListener restrictToAuthenticated(
{String userKey, String errorMessage}) {
{userKey, String errorMessage}) {
return (HookedServiceEvent e) async {
var user = e.request?.grab(userKey ?? 'user');

View file

@ -7,7 +7,7 @@ import 'is_server_side.dart';
HookedServiceEventListener restrictToOwner(
{String idField,
String ownerField,
String userKey,
userKey,
String errorMessage,
getId(user),
getOwner(obj)}) {

View file

@ -8,7 +8,7 @@ import '../permissions.dart';
HookedServiceEventListener variantPermission(
createPermission(HookedServiceEvent e),
{String errorMessage,
String userKey,
userKey,
bool owner: false,
getRoles(user),
getId(user),

View file

@ -1,5 +1,5 @@
name: angel_security
version: 0.0.7
version: 1.0.0
description: Angel middleware designed to enhance application security by patching common Web security holes.
author: Tobe O <thosakwe@gmail.com>
environment: