diff --git a/src/Http/Controllers/Admin/ModuleController.php b/src/Http/Controllers/Admin/ModuleController.php
index 08d06c728..87172bd83 100644
--- a/src/Http/Controllers/Admin/ModuleController.php
+++ b/src/Http/Controllers/Admin/ModuleController.php
@@ -1778,7 +1778,7 @@ protected function getIndexData(array $prependScope = []): array
// @todo: use $this->filters instead of indexData.
$indexDataWithoutFilters = $this->indexData($this->request);
foreach ($indexDataWithoutFilters as $key => $value) {
- if (Str::endsWith($key, 'List')) {
+ if ($key !== 'roleList' && Str::endsWith($key, 'List')) {
unset($indexDataWithoutFilters[$key]);
}
}
@@ -1922,7 +1922,7 @@ public function filters(): TableFilters
$tableFilters = TableFilters::make();
foreach ($this->indexData($this->request) as $key => $value) {
- if (Str::endsWith($key, 'List')) {
+ if ($key !== 'roleList' && Str::endsWith($key, 'List')) {
$queryString = Str::beforeLast($key, 'List');
if ($filterKey = ($this->filters[$queryString] ?? false)) {
diff --git a/views/users/create.blade.php b/views/users/create.blade.php
index 9fe16907f..63943c512 100644
--- a/views/users/create.blade.php
+++ b/views/users/create.blade.php
@@ -11,16 +11,14 @@
type="email"
/>
- @can('edit-user-roles')
- @php $userModel = twillModel('user') @endphp
+ @php $userModel = twillModel('user') @endphp
-
- @endcan
+
@endunless