We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57b4b14 commit e0b729dCopy full SHA for e0b729d
lib/model/user_group.dart
@@ -113,14 +113,7 @@ class UserGroupStoreImpl extends PerAccountStoreBase with UserGroupStore {
113
};
114
}
115
116
- bool _selfInGroup(int groupId) {
117
- final group = _groups[groupId];
118
- if (group == null) return false; // TODO(log); should know all groups
119
- // TODO(perf), TODO(#814): memoize which groups the self-user is in,
120
- // to save doing this depth-first search on each permission check
121
- return group.members.contains(selfUserId)
122
- || group.directSubgroupIds.any(_selfInGroup);
123
- }
+ bool _selfInGroup(int groupId) => _selfUserGroups.contains(groupId);
124
125
/// All the (named) user groups in the realm.
126
///
0 commit comments