From 310474438ecaea30385a35592c19cedb3accb951 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Fri, 22 Dec 2017 08:34:31 -0500 Subject: [PATCH] Remove Extensible --- .idea/libraries/Dart_Packages.xml | 612 +++++++++++++++++++++ .idea/libraries/Dart_SDK.xml | 26 + .idea/misc.xml | 6 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + analysis_options.yaml | 2 + lib/src/hooks/associate_current_user.dart | 4 - lib/src/hooks/hash_password.dart | 4 - lib/src/hooks/query_with_current_user.dart | 2 - lib/src/hooks/restrict_to_owner.dart | 4 - security.iml | 14 + 11 files changed, 674 insertions(+), 14 deletions(-) create mode 100644 .idea/libraries/Dart_Packages.xml create mode 100644 .idea/libraries/Dart_SDK.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 analysis_options.yaml create mode 100644 security.iml diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml new file mode 100644 index 00000000..724a48ff --- /dev/null +++ b/.idea/libraries/Dart_Packages.xml @@ -0,0 +1,612 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml new file mode 100644 index 00000000..2255dbd8 --- /dev/null +++ b/.idea/libraries/Dart_SDK.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..639900d1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..af25876f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..518eb901 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true \ No newline at end of file diff --git a/lib/src/hooks/associate_current_user.dart b/lib/src/hooks/associate_current_user.dart index fbebdde9..453d4c67 100644 --- a/lib/src/hooks/associate_current_user.dart +++ b/lib/src/hooks/associate_current_user.dart @@ -33,8 +33,6 @@ HookedServiceEventListener associateCurrentUser( return getId(user); else if (user is Map) return user[idField ?? 'id']; - else if (user is Extensible) - return user.properties[idField ?? 'id']; else if (idField == null || idField == 'id') return user.id; else @@ -52,8 +50,6 @@ HookedServiceEventListener associateCurrentUser( return assignUserId(id, obj); else if (obj is Map) obj[fieldName] = id; - else if (obj is Extensible) - obj.properties[fieldName] = id; else if (fieldName == 'userId') obj.userId = id; else diff --git a/lib/src/hooks/hash_password.dart b/lib/src/hooks/hash_password.dart index f05756c6..ab537fdc 100644 --- a/lib/src/hooks/hash_password.dart +++ b/lib/src/hooks/hash_password.dart @@ -20,8 +20,6 @@ HookedServiceEventListener hashPassword( return getPassword(user); else if (user is Map) return user[passwordField ?? 'password']; - else if (user is Extensible) - return user.properties[passwordField ?? 'password']; else if (passwordField == 'password') return user?.password; else @@ -35,8 +33,6 @@ HookedServiceEventListener hashPassword( return setPassword(password, user); else if (user is Map) user[passwordField ?? 'password'] = password; - else if (user is Extensible) - user.properties[passwordField ?? password] = password; else reflect(user) .setField(new Symbol(passwordField ?? 'password'), password); diff --git a/lib/src/hooks/query_with_current_user.dart b/lib/src/hooks/query_with_current_user.dart index 76d7bb94..91f5f0da 100644 --- a/lib/src/hooks/query_with_current_user.dart +++ b/lib/src/hooks/query_with_current_user.dart @@ -31,8 +31,6 @@ HookedServiceEventListener queryWithCurrentUser( return getId(user); else if (user is Map) return user[fieldName]; - else if (user is Extensible) - return user.properties[fieldName]; else if (fieldName == 'id') return user.id; else diff --git a/lib/src/hooks/restrict_to_owner.dart b/lib/src/hooks/restrict_to_owner.dart index 5f7cca2d..61b1a084 100644 --- a/lib/src/hooks/restrict_to_owner.dart +++ b/lib/src/hooks/restrict_to_owner.dart @@ -25,8 +25,6 @@ HookedServiceEventListener restrictToOwner( return getId(user); else if (user is Map) return user[idField ?? 'id']; - else if (user is Extensible) - return user.properties[idField ?? 'id']; else if (idField == null || idField == 'id') return user.id; else @@ -49,8 +47,6 @@ HookedServiceEventListener restrictToOwner( return getOwner(obj); else if (obj is Map) return obj[ownerField ?? 'userId']; - else if (obj is Extensible) - return obj.properties[ownerField ?? 'userId']; else if (ownerField == null || ownerField == 'userId') return obj.userId; else diff --git a/security.iml b/security.iml new file mode 100644 index 00000000..5a5ced28 --- /dev/null +++ b/security.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file