diff --git a/README.md b/README.md index 005b7ab7..2f2eb419 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/src/hooks/add_user_to_params.dart b/lib/src/hooks/add_user_to_params.dart index ee84b3bc..e44c48ec 100644 --- a/lib/src/hooks/add_user_to_params.dart +++ b/lib/src/hooks/add_user_to_params.dart @@ -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'); diff --git a/lib/src/hooks/associate_current_user.dart b/lib/src/hooks/associate_current_user.dart index 4e0d117f..fbebdde9 100644 --- a/lib/src/hooks/associate_current_user.dart +++ b/lib/src/hooks/associate_current_user.dart @@ -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), diff --git a/lib/src/hooks/query_with_current_user.dart b/lib/src/hooks/query_with_current_user.dart index 13643f42..76d7bb94 100644 --- a/lib/src/hooks/query_with_current_user.dart +++ b/lib/src/hooks/query_with_current_user.dart @@ -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)}) { diff --git a/lib/src/hooks/resrict_to_authenticated.dart b/lib/src/hooks/resrict_to_authenticated.dart index fe3c7968..a0003dbd 100644 --- a/lib/src/hooks/resrict_to_authenticated.dart +++ b/lib/src/hooks/resrict_to_authenticated.dart @@ -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'); diff --git a/lib/src/hooks/restrict_to_owner.dart b/lib/src/hooks/restrict_to_owner.dart index 0966aee2..5f7cca2d 100644 --- a/lib/src/hooks/restrict_to_owner.dart +++ b/lib/src/hooks/restrict_to_owner.dart @@ -7,7 +7,7 @@ import 'is_server_side.dart'; HookedServiceEventListener restrictToOwner( {String idField, String ownerField, - String userKey, + userKey, String errorMessage, getId(user), getOwner(obj)}) { diff --git a/lib/src/hooks/variant_permission.dart b/lib/src/hooks/variant_permission.dart index f80afdac..5a884ab2 100644 --- a/lib/src/hooks/variant_permission.dart +++ b/lib/src/hooks/variant_permission.dart @@ -8,7 +8,7 @@ import '../permissions.dart'; HookedServiceEventListener variantPermission( createPermission(HookedServiceEvent e), {String errorMessage, - String userKey, + userKey, bool owner: false, getRoles(user), getId(user), diff --git a/pubspec.yaml b/pubspec.yaml index 0b99a20c..ee914fc9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 environment: