Only show create button if user has required permissions
This commit is contained in:
parent
706b22beb5
commit
cf2704436b
|
|
@ -72,7 +72,9 @@ class ListScaffold extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (entityType != null && entityType != EntityType.settings) {
|
} else if (entityType != null &&
|
||||||
|
entityType != EntityType.settings &&
|
||||||
|
state.userCompany.canCreate(entityType)) {
|
||||||
leading = Padding(
|
leading = Padding(
|
||||||
padding: const EdgeInsets.only(left: 16, right: 14),
|
padding: const EdgeInsets.only(left: 16, right: 14),
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue