getSharePermissions method
Returns the share permissions for a filter. A filter can be shared with groups, projects, all logged-in users, or the public. Sharing with all logged-in users or the public is known as a global share permission.
This operation can be accessed anonymously.
Permissions required: None, however, share permissions are only returned for:
- filters owned by the user.
- filters shared with a group that the user is a member of.
- filters shared with a private project that the user has Browse projects project permission for.
- filters shared with a public project.
- filters shared with the public.
Implementation
Future<List<SharePermission>> getSharePermissions(int id) async {
return (await _client.send(
'get',
'rest/api/3/filter/{id}/permission',
pathParameters: {
'id': '$id',
},
) as List<Object?>)
.map((i) =>
SharePermission.fromJson(i as Map<String, Object?>? ?? const {}))
.toList();
}