Only show create button if user has required permissions

This commit is contained in:
Hillel Coren 2023-01-23 13:45:55 +02:00
parent 706b22beb5
commit cf2704436b
1 changed files with 3 additions and 1 deletions

View File

@ -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(
padding: const EdgeInsets.only(left: 16, right: 14),
child: OutlinedButton(