+signup +login
Some checks failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
Some checks failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
This commit is contained in:
32
frontend/pshared/lib/models/permissions/bound.dart
Normal file
32
frontend/pshared/lib/models/permissions/bound.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
import 'package:pshared/config/constants.dart';
|
||||
import 'package:pshared/models/organization/bound.dart';
|
||||
|
||||
|
||||
abstract class PermissionBound extends OrganizationBound {
|
||||
String get permissionRef;
|
||||
}
|
||||
|
||||
@immutable
|
||||
class _PermissionBoundImp implements PermissionBound {
|
||||
@override
|
||||
final String permissionRef;
|
||||
final OrganizationBound organizationBound;
|
||||
|
||||
@override
|
||||
get organizationRef => organizationBound.organizationRef;
|
||||
|
||||
const _PermissionBoundImp({
|
||||
required this.permissionRef,
|
||||
required this.organizationBound,
|
||||
});
|
||||
}
|
||||
|
||||
PermissionBound newPermissionBound({
|
||||
required OrganizationBound organizationBound,
|
||||
String? permissionRef,
|
||||
}) => _PermissionBoundImp(
|
||||
permissionRef: permissionRef ?? Constants.nilObjectRef,
|
||||
organizationBound: organizationBound,
|
||||
);
|
||||
@@ -0,0 +1,6 @@
|
||||
import 'package:pshared/models/permissions/bound/storable.dart';
|
||||
import 'package:pshared/models/storable/describable.dart';
|
||||
|
||||
|
||||
abstract class PermissionBoundStorableDescribable implements PermissionBoundStorable, StorableDescribable {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import 'package:pshared/models/permissions/bound.dart';
|
||||
import 'package:pshared/models/storable.dart';
|
||||
|
||||
|
||||
abstract class PermissionBoundStorable implements PermissionBound, Storable {
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
import 'package:pshared/models/describable.dart';
|
||||
import 'package:pshared/models/resources.dart';
|
||||
import 'package:pshared/models/storable.dart';
|
||||
import 'package:pshared/models/storable/describable.dart';
|
||||
|
||||
|
||||
class PolicyDescription implements Storable {
|
||||
class PolicyDescription implements StorableDescribable {
|
||||
final Storable storable;
|
||||
final Describable describable;
|
||||
final List<ResourceType>? resourceTypes;
|
||||
final String? organizationRef;
|
||||
|
||||
@@ -13,9 +16,14 @@ class PolicyDescription implements Storable {
|
||||
DateTime get createdAt => storable.createdAt;
|
||||
@override
|
||||
DateTime get updatedAt => storable.updatedAt;
|
||||
@override
|
||||
String get name => describable.name;
|
||||
@override
|
||||
String? get description => describable.description;
|
||||
|
||||
const PolicyDescription({
|
||||
required this.storable,
|
||||
required this.describable,
|
||||
required this.resourceTypes,
|
||||
required this.organizationRef,
|
||||
});
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import 'package:pshared/models/describable.dart';
|
||||
import 'package:pshared/models/storable.dart';
|
||||
import 'package:pshared/models/storable/describable.dart';
|
||||
|
||||
|
||||
class RoleDescription implements Storable {
|
||||
class RoleDescription implements StorableDescribable {
|
||||
final Storable storable;
|
||||
final Describable describable;
|
||||
|
||||
@override
|
||||
String get id => storable.id;
|
||||
@@ -10,18 +13,25 @@ class RoleDescription implements Storable {
|
||||
DateTime get createdAt => storable.createdAt;
|
||||
@override
|
||||
DateTime get updatedAt => storable.updatedAt;
|
||||
@override
|
||||
String get name => describable.name;
|
||||
@override
|
||||
String? get description => describable.description;
|
||||
|
||||
final String organizationRef;
|
||||
|
||||
const RoleDescription({
|
||||
required this.storable,
|
||||
required this.describable,
|
||||
required this.organizationRef,
|
||||
});
|
||||
|
||||
factory RoleDescription.build({
|
||||
required Describable roleDescription,
|
||||
required String organizationRef,
|
||||
}) => RoleDescription(
|
||||
storable: newStorable(),
|
||||
describable: roleDescription,
|
||||
organizationRef: organizationRef
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user