Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from Iconica-Development/fix_multiple_roles
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Gorter-dev authored Oct 20, 2022
2 parents f8cb1fd + 0fa192c commit a5e1164
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .flutter-plugins
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This is a generated file; do not edit or check into version control.
cloud_firestore_web=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.8.10/
firebase_auth=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/
firebase_auth_web=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-4.6.1/
firebase_core=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/
firebase_core_web=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/
firebase_database=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database-9.1.7/
firebase_database_web=/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.2.1+9/
cloud_firestore_web=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\cloud_firestore_web-3.0.1\\
firebase_auth=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_auth-4.0.1\\
firebase_auth_web=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_auth_web-5.0.1\\
firebase_core=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core-2.0.0\\
firebase_core_web=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core_web-2.0.0\\
firebase_database=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_database-10.0.1\\
firebase_database_web=C:\\Program Files\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_database_web-0.2.1+11\\
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_auth","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database-9.1.7/","native_build":true,"dependencies":["firebase_core"]}],"android":[{"name":"firebase_auth","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database-9.1.7/","native_build":true,"dependencies":["firebase_core"]}],"macos":[{"name":"firebase_auth","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-3.11.2/","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.24.0/","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database-9.1.7/","native_build":true,"dependencies":["firebase_core"]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-2.8.10/","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_auth_web-4.6.1/","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-1.7.3/","dependencies":[]},{"name":"firebase_database_web","path":"/Users/nielsgorter/.pub-cache/hosted/pub.dartlang.org/firebase_database_web-0.2.1+9/","dependencies":["firebase_core_web"]}]},"dependencyGraph":[{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_database","dependencies":["firebase_core","firebase_database_web"]},{"name":"firebase_database_web","dependencies":["firebase_core","firebase_core_web"]}],"date_created":"2022-10-10 09:22:43.554455","version":"3.3.4"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_auth","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-4.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-2.0.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-10.0.1\\\\","native_build":true,"dependencies":["firebase_core"]}],"android":[{"name":"firebase_auth","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-4.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-2.0.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-10.0.1\\\\","native_build":true,"dependencies":["firebase_core"]}],"macos":[{"name":"firebase_auth","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-4.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-2.0.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_database","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database-10.0.1\\\\","native_build":true,"dependencies":["firebase_core"]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\cloud_firestore_web-3.0.1\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth_web-5.0.1\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core_web-2.0.0\\\\","dependencies":[]},{"name":"firebase_database_web","path":"C:\\\\Program Files\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_database_web-0.2.1+11\\\\","dependencies":["firebase_core_web"]}]},"dependencyGraph":[{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_database","dependencies":["firebase_core","firebase_database_web"]},{"name":"firebase_database_web","dependencies":["firebase_core","firebase_core_web"]}],"date_created":"2022-10-20 11:22:23.581701","version":"3.3.5"}
6 changes: 2 additions & 4 deletions lib/src/rbac.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ class Rbac {
.once())
.snapshot;

List newRoles;
List newRoles = [];
var value = res.value;
if (value is List) {
newRoles = value;
} else {
newRoles = [];
newRoles.addAll(value);
}

if (!newRoles.contains(role)) {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: flutter_rbac
description: A new Flutter package project.
version: 0.0.1
version: 0.0.2

environment:
sdk: '>=2.18.2 <3.0.0'
sdk: ">=2.18.2 <3.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down

0 comments on commit a5e1164

Please sign in to comment.