mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Nc album shared with you is not allowed to be renamed
This commit is contained in:
parent
423ab9ebb1
commit
51b9d26e31
2 changed files with 15 additions and 2 deletions
|
@ -150,8 +150,16 @@ class CollectionNcAlbumAdapter
|
|||
Future<void> remove() => RemoveNcAlbum(_c)(account, _provider.album);
|
||||
|
||||
@override
|
||||
bool isPermitted(CollectionCapability capability) =>
|
||||
_provider.capabilities.contains(capability);
|
||||
bool isPermitted(CollectionCapability capability) {
|
||||
if (!_provider.capabilities.contains(capability)) {
|
||||
return false;
|
||||
}
|
||||
if (_provider.isOwned) {
|
||||
return true;
|
||||
} else {
|
||||
return _provider.guestCapabilities.contains(capability);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
bool isManualCover() => false;
|
||||
|
|
|
@ -44,6 +44,11 @@ class CollectionNcAlbumProvider
|
|||
// CollectionCapability.share,
|
||||
];
|
||||
|
||||
/// Capabilities when this album is shared to this user by someone else
|
||||
List<CollectionCapability> get guestCapabilities => [
|
||||
CollectionCapability.manualItem,
|
||||
];
|
||||
|
||||
@override
|
||||
CollectionItemSort get itemSort => CollectionItemSort.dateDescending;
|
||||
|
||||
|
|
Loading…
Reference in a new issue