diff --git a/app/Album.php b/app/Album.php index 5c72aba..cdcbba1 100644 --- a/app/Album.php +++ b/app/Album.php @@ -35,11 +35,6 @@ class Album extends Model return $this->belongsToMany(Permission::class, 'album_anonymous_permissions'); } - public function doesAnonymousHavePermission(Permission $permission) - { - return $this->anonymousPermissions()->where(['permission_id' => $permission->id])->count() > 0; - } - public function doesGroupHavePermission(Group $group, Permission $permission) { return $this->groupPermissions()->where([ @@ -48,6 +43,22 @@ class Album extends Model ])->count() > 0; } + public function doesUserHavePermission($user, Permission $permission) + { + // User will be null for anonymous users + if (is_null($user)) + { + return $this->anonymousPermissions()->where(['permission_id' => $permission->id])->count() > 0; + } + else + { + return $this->userPermissions()->where([ + 'user_id' => $user->id, + 'permission_id' => $permission->id + ])->count() > 0; + } + } + public function generateAlias() { $this->url_alias = ucfirst(preg_replace('/[^a-z0-9\-]/', '-', strtolower($this->name))); @@ -107,4 +118,9 @@ class Album extends Model { return route('viewAlbum', $this->url_alias); } + + public function userPermissions() + { + return $this->belongsToMany(Permission::class, 'album_user_permissions'); + } } \ No newline at end of file diff --git a/app/Helpers/DbHelper.php b/app/Helpers/DbHelper.php index f35b366..8c74943 100644 --- a/app/Helpers/DbHelper.php +++ b/app/Helpers/DbHelper.php @@ -4,35 +4,60 @@ namespace App\Helpers; use App\Album; use App\Facade\UserConfig; +use Illuminate\Database\Query\Builder; use Illuminate\Support\Facades\Auth; class DbHelper { public static function getAlbumsForCurrentUser() { + $albumsQuery = Album::query(); $user = Auth::user(); - $userId = is_null($user) ? 0 : $user->id; - $albums = Album::where('is_private', false) - ->orWhere(function ($query) use ($userId) - { - $query->where('is_private', true) - ->where('user_id', $userId); - }) + if (!is_null($user) && $user->is_admin) + { + /* Admin users always get everything, therefore no filters are necessary */ + } + else if (is_null($user)) + { + /* Anonymous users need to check the album_anonymous_permissions table. If not in this table, you're not allowed! */ + + $albumsQuery = Album::join('album_anonymous_permissions', 'album_anonymous_permissions.album_id', '=', 'albums.id') + ->join('permissions', 'permissions.id', '=', 'album_anonymous_permissions.permission_id') + ->where([ + ['permissions.section', 'album'], + ['permissions.description', 'list'] + ]); + } + else + { + /* + Other users need to check either the album_group_permissions or album_user_permissions table. If not in either of these tables, + you're not allowed! + */ + + $albumsQuery = Album::leftJoin('album_group_permissions', 'album_group_permissions.album_id', '=', 'albums.id') + ->leftJoin('album_user_permissions', 'album_user_permissions.album_id', '=', 'albums.id') + ->leftJoin('permissions AS group_permissions', 'group_permissions.id', '=', 'album_group_permissions.permission_id') + ->leftJoin('permissions AS user_permissions', 'user_permissions.id', '=', 'album_user_permissions.permission_id') + ->leftJoin('user_groups', 'user_groups.group_id', '=', 'album_group_permissions.group_id') + ->where('albums.user_id', $user->id) + ->orWhere([ + ['group_permissions.section', 'album'], + ['group_permissions.description', 'list'], + ['user_groups.user_id', $user->id] + ]) + ->orWhere([ + ['user_permissions.section', 'album'], + ['user_permissions.description', 'list'], + ['album_user_permissions.user_id', $user->id] + ]); + } + + return $albumsQuery->select('albums.*') + ->distinct() ->orderBy('name') ->withCount('photos') ->paginate(UserConfig::get('items_per_page')); - - return $albums; - } - - /** - * Fetches an album using its URL alias. - * @param string $urlAlias URL alias of the album to fetch. - * @return Album|null - */ - public static function loadAlbumByUrlAlias($urlAlias) - { - return Album::where('url_alias', $urlAlias)->first(); } } \ No newline at end of file diff --git a/app/Http/Controllers/Admin/AlbumController.php b/app/Http/Controllers/Admin/AlbumController.php index 03dc612..5b3ec49 100644 --- a/app/Http/Controllers/Admin/AlbumController.php +++ b/app/Http/Controllers/Admin/AlbumController.php @@ -7,6 +7,7 @@ use App\AlbumGroupPermission; use App\Facade\Theme; use App\Facade\UserConfig; use App\Group; +use App\Helpers\DbHelper; use App\Helpers\FileHelper; use App\Helpers\MiscHelper; use App\Http\Controllers\Controller; @@ -16,6 +17,7 @@ use App\Photo; use App\Services\PhotoService; use App\Storage; use App\Upload; +use App\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Auth; @@ -32,7 +34,7 @@ class AlbumController extends Controller public function analyse($id, $queue_token) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); $photos = $album->photos() @@ -55,7 +57,7 @@ class AlbumController extends Controller */ public function create(Request $request) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $albumSources = []; foreach (Storage::where('is_active', true)->orderBy('name')->get() as $storage) @@ -79,7 +81,7 @@ class AlbumController extends Controller public function delete($id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); @@ -94,7 +96,7 @@ class AlbumController extends Controller */ public function destroy($id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); @@ -120,7 +122,7 @@ class AlbumController extends Controller */ public function edit($id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); @@ -134,11 +136,9 @@ class AlbumController extends Controller */ public function index() { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); - $albums = Album::orderBy('name') - ->withCount('photos') - ->paginate(UserConfig::get('items_per_page')); + $albums = DbHelper::getAlbumsForCurrentUser(); return Theme::render('admin.list_albums', [ 'albums' => $albums @@ -147,7 +147,7 @@ class AlbumController extends Controller public function setGroupPermissions(Request $request, $id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); /** @var Album $album */ $album = $this->loadAlbum($id); @@ -167,10 +167,12 @@ class AlbumController extends Controller /** @var Permission $permission */ foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission) { - $album->groupPermissions()->attach($permission->id, ['group_id' => $group->id]); + $album->groupPermissions()->attach($permission->id, [ + 'group_id' => $group->id, + 'created_at' => new \DateTime(), + 'updated_at' => new \DateTime() + ]); } - - $album->save(); } else if ($request->get('action') == 'update_group_permissions') { @@ -193,10 +195,46 @@ class AlbumController extends Controller } } } + + $album->save(); + + return redirect(route('albums.show', [$album->id, 'tab' => 'permissions'])); + } + + public function setUserPermissions(Request $request, $id) + { + $this->authorizeAccessToAdminPanel(); + + /** @var Album $album */ + $album = $this->loadAlbum($id); + + if ($request->get('action') == 'add_user' && $request->has('user_id')) + { + /* Add a new user to the permission list for this album */ + + /** @var User $user */ + $user = User::where('id', $request->get('user_id'))->first(); + if (is_null($user)) + { + App::abort(404); + } + + // Link all default permissions to the group + /** @var Permission $permission */ + foreach (Permission::where(['section' => 'album', 'is_default' => true])->get() as $permission) + { + $album->userPermissions()->attach($permission->id, [ + 'user_id' => $user->id, + 'created_at' => new \DateTime(), + 'updated_at' => new \DateTime() + ]); + } + } else if ($request->get('action') == 'update_user_permissions') { /* Update existing user and anonymous permissions for this album */ $album->anonymousPermissions()->detach(); + $album->userPermissions()->detach(); $permissions = $request->get('permissions'); if (is_array($permissions)) @@ -211,9 +249,30 @@ class AlbumController extends Controller ]); } } + + foreach ($permissions as $key => $value) + { + $userID = intval($key); + if ($userID == 0) + { + // Skip non-numeric IDs (e.g. anonymous) + continue; + } + + foreach ($value as $permissionID) + { + $album->userPermissions()->attach($permissionID, [ + 'user_id' => $userID, + 'created_at' => new \DateTime(), + 'updated_at' => new \DateTime() + ]); + } + } } } + $album->save(); + return redirect(route('albums.show', [$album->id, 'tab' => 'permissions'])); } @@ -225,7 +284,7 @@ class AlbumController extends Controller */ public function show(Request $request, $id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); $photos = $album->photos() @@ -258,6 +317,15 @@ class AlbumController extends Controller } } + $existingUsers = []; + foreach (User::orderBy('name')->get() as $user) + { + if ($album->userPermissions()->where('user_id', $user->id)->count() > 0) + { + $existingUsers[] = $user; + } + } + $activeTab = $request->get('tab'); return Theme::render('admin.show_album', [ @@ -280,6 +348,7 @@ class AlbumController extends Controller ], 'error' => $request->session()->get('error'), 'existing_groups' => $existingGroups, + 'existing_users' => $existingUsers, 'file_upload_limit' => $fileUploadLimit, 'is_upload_enabled' => $isUploadEnabled, 'max_post_limit' => $postLimit, @@ -299,7 +368,7 @@ class AlbumController extends Controller */ public function store(Requests\StoreAlbumRequest $request) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = new Album(); $album->fill($request->only(['name', 'description', 'storage_id'])); @@ -323,7 +392,7 @@ class AlbumController extends Controller */ public function update(Requests\StoreAlbumRequest $request, $id) { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); $album = $this->loadAlbum($id); $album->fill($request->only(['name', 'description'])); diff --git a/app/Http/Controllers/Admin/DefaultController.php b/app/Http/Controllers/Admin/DefaultController.php index d61e0d1..521c3c8 100644 --- a/app/Http/Controllers/Admin/DefaultController.php +++ b/app/Http/Controllers/Admin/DefaultController.php @@ -8,6 +8,7 @@ use App\Facade\Theme; use App\Facade\UserConfig; use App\Group; use App\Helpers\ConfigHelper; +use App\Helpers\DbHelper; use App\Http\Controllers\Controller; use App\Http\Requests\SaveSettingsRequest; use App\Mail\TestMailConfig; @@ -30,9 +31,9 @@ class DefaultController extends Controller public function index() { - $this->authorize('admin-access'); + $this->authorizeAccessToAdminPanel(); - $albumCount = Album::all()->count(); + $albumCount = DbHelper::getAlbumsForCurrentUser()->count(); $photoCount = Photo::all()->count(); $groupCount = Group::all()->count(); $userCount = User::where('is_activated', true)->count(); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index ace5453..100ad75 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -88,6 +88,7 @@ class UserController extends Controller $user->password = bcrypt($user->password); $user->is_activated = true; $user->is_admin = (strtolower($request->get('is_admin')) == 'on'); + $user->can_create_albums = (strtolower($request->get('can_create_albums')) == 'on'); $user->save(); return redirect(route('users.index')); @@ -168,6 +169,8 @@ class UserController extends Controller $user->is_admin = (strtolower($request->get('is_admin')) == 'on'); } + $user->can_create_albums = (strtolower($request->get('can_create_albums')) == 'on'); + // Manually activate account if requested if (strtolower($request->get('is_activated')) == 'on') { @@ -238,4 +241,33 @@ class UserController extends Controller return redirect(route('users.index')); } + + /** + * Returns a list of users in JSON format - either all users or users matching the "q" query string parameter + * + * @param string $q Search term + * @return \Illuminate\Http\Response + */ + public function searchJson(Request $request) + { + $this->authorize('admin-access'); + + $limit = intval($request->get('n')); + if ($limit == 0) + { + $limit = 100; + } + + $q = $request->get('q'); + if (strlen($q) == 0) + { + return User::limit($limit)->get()->toJson(); + } + + return User::where('name', 'like', '%' . $q . '%') + ->limit($limit) + ->orderBy('name') + ->get() + ->toJson(); + } } diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index dc0280f..f46b290 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -16,6 +16,16 @@ class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests; + protected function authorizeAccessToAdminPanel() + { + // A user can access the admin panel if they are either an administrator, or are allowed to create albums + // Further checks within the admin panel determine what a user can do within the panel + if (!Auth::user()->can('admin-access') && !Auth::user()->can('admin-create-albums')) + { + App::abort(403); + } + } + /** * Gets either the authenticated user, or a user object representing the anonymous user. * @return User diff --git a/app/Http/Controllers/Gallery/AlbumController.php b/app/Http/Controllers/Gallery/AlbumController.php index 4c91269..85246b1 100644 --- a/app/Http/Controllers/Gallery/AlbumController.php +++ b/app/Http/Controllers/Gallery/AlbumController.php @@ -17,7 +17,7 @@ class AlbumController extends Controller { public function index(Request $request, $albumUrlAlias) { - $album = DbHelper::loadAlbumByUrlAlias($albumUrlAlias); + $album = DbHelper::getAlbumByAliasForCurrentUser($albumUrlAlias); if (is_null($album)) { App::abort(404); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 4ca04b1..8546b02 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -36,6 +36,10 @@ class AuthServiceProvider extends ServiceProvider { return $user->is_admin; }); + Gate::define('admin-create-albums', function ($user) + { + return $user->can_create_albums; + }); Gate::define('photo.download_original', function ($user, Photo $photo) { if (!UserConfig::get('restrict_original_download')) diff --git a/app/User.php b/app/User.php index 8aee66a..5035918 100644 --- a/app/User.php +++ b/app/User.php @@ -15,7 +15,7 @@ class User extends Authenticatable * @var array */ protected $fillable = [ - 'name', 'email', 'password', 'is_admin', 'is_activated', 'activation_token' + 'name', 'email', 'password', 'is_admin', 'is_activated', 'activation_token', 'can_create_albums' ]; /** diff --git a/database/migrations/2017_02_15_101322_create_permissions_table.php b/database/migrations/2017_02_15_101322_create_permissions_table.php index fb3ba73..b48e9b5 100644 --- a/database/migrations/2017_02_15_101322_create_permissions_table.php +++ b/database/migrations/2017_02_15_101322_create_permissions_table.php @@ -18,6 +18,7 @@ class CreatePermissionsTable extends Migration $table->string('section'); $table->string('description'); $table->boolean('is_default'); + $table->integer('sort_order'); $table->timestamps(); }); diff --git a/database/migrations/2017_03_21_211508_add_user_upload_flag.php b/database/migrations/2017_03_21_211508_add_user_upload_flag.php new file mode 100644 index 0000000..54a513a --- /dev/null +++ b/database/migrations/2017_03_21_211508_add_user_upload_flag.php @@ -0,0 +1,32 @@ +boolean('can_create_albums')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('can_create_albums'); + }); + } +} diff --git a/database/seeds/PermissionsSeeder.php b/database/seeds/PermissionsSeeder.php index 299c7bf..a9a6aaf 100644 --- a/database/seeds/PermissionsSeeder.php +++ b/database/seeds/PermissionsSeeder.php @@ -15,14 +15,24 @@ class PermissionsSeeder extends Seeder DatabaseSeeder::createOrUpdate('permissions', [ 'section' => 'album', 'description' => 'list-gallery', - 'is_default' => true + 'is_default' => true, + 'sort_order' => 0 ]); // album:view = controls if the album can be viewed DatabaseSeeder::createOrUpdate('permissions', [ 'section' => 'album', 'description' => 'view', - 'is_default' => true + 'is_default' => true, + 'sort_order' => 20 + ]); + + // album:edit = controls if the album is visible and can be edited in the admin panel + DatabaseSeeder::createOrUpdate('permissions', [ + 'section' => 'album', + 'description' => 'edit', + 'is_default' => true, + 'sort_order' => 10 ]); } } diff --git a/public/license-required.php b/public/license-required.php deleted file mode 100644 index 52b3bd3..0000000 --- a/public/license-required.php +++ /dev/null @@ -1,98 +0,0 @@ - - -

-

-

%s', $_SERVER['SERVER_NAME']), $lang['license_required_p2']); ?>

-
- - -
-

-
- - -
-

-
- -
-
- - -
- -
- -
-
- - \ No newline at end of file diff --git a/public/loader-required.php b/public/loader-required.php deleted file mode 100644 index d185ad9..0000000 --- a/public/loader-required.php +++ /dev/null @@ -1,49 +0,0 @@ - - -

-

-

- -

- -

- \ No newline at end of file diff --git a/public/raw/lang.en.php b/public/raw/lang.en.php deleted file mode 100644 index 1bd232b..0000000 --- a/public/raw/lang.en.php +++ /dev/null @@ -1,36 +0,0 @@ - 'Blue Twilight - Install', - 'copyright' => sprintf('© %s Andy Heathershaw.', (date('Y') == 2016 ? 2016 : '2016-' . date('Y'))), - 'license_errors' => [ - 1 => 'The application is not licensed to run on this machine or domain.', - 2 => 'The application is not licensed to run on this machine or domain.', - 3 => 'The application is not licensed to run on this machine or domain.', - 6 => 'The license file provided is invalid.', - 7 => 'This version of PHP is not supported. Please upgrade to a supported version of PHP or contact support.', - 9 => 'The application/license has expired.', - 13 => 'No license is currently available.', - 20 => 'The application requires an Internet connection that was not available.', - 99 => 'An unexpected error occurred, please contact support.' - ], - 'license_required_p1' => 'Blue Twilight requires a license to run correctly. You can generate and download a license file from the My Orders page.', - 'license_required_p2' => 'Your license file must match the hostname: :host_name.', - 'license_required_title' => 'License Required', - 'loader_required_p1' => 'Blue Twilight uses the Source Guardian source code protection system which requires a small "loader" to be installed on your system.', - 'loader_required_p2' => 'Please see this web page to download the loader for your system. You can use the "loader assistant" and provide the following URL for the PHP information:', - 'loader_required_retry' => 'Click here to retry', - 'loader_required_title' => 'Source Guardian Loader Required', - 'powered_by' => 'Powered by Blue Twilight - the self-hosted photo gallery software.', - 'upload_action' => 'Upload', - 'upload_errors' => [ - 1 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', - 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', - 3 => 'The uploaded file was only partially uploaded.', - 4 => 'No file was uploaded.', - 6 => 'Missing a temporary folder.', - 7 => 'Failed to write file to disk.', - 8 => 'A PHP extension blocked the file upload - please contact your system administrator.', - 99 => 'Failed to write the license file - please check file permissions in Blue Twilight\'s root directory.' - ], - 'upload_license_label' => 'Please locate your license file to upload:' -]; \ No newline at end of file diff --git a/public/raw/layout.php b/public/raw/layout.php deleted file mode 100644 index b361596..0000000 --- a/public/raw/layout.php +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - <?php echo $lang['app_name']; ?> - - - - - - - - - -
-
- -
- -
-
-
-
-

-
- -

-
-
-
-
- - - - - - diff --git a/public/raw/sg-license-error.php b/public/raw/sg-license-error.php deleted file mode 100644 index dcd546c..0000000 --- a/public/raw/sg-license-error.php +++ /dev/null @@ -1,37 +0,0 @@ - \ No newline at end of file diff --git a/public/themes/base/css/app.css b/public/themes/base/css/app.css index c71aefd..a2ac1e7 100644 --- a/public/themes/base/css/app.css +++ b/public/themes/base/css/app.css @@ -17,4 +17,8 @@ .no-padding { padding: 0; +} + +span.twitter-typeahead { + width: 100%; } \ No newline at end of file diff --git a/public/themes/base/css/typeahead.css b/public/themes/base/css/typeahead.css new file mode 100644 index 0000000..4d11032 --- /dev/null +++ b/public/themes/base/css/typeahead.css @@ -0,0 +1,30 @@ +.tt-hint { + color: #999; +} + +.tt-menu { + width: 422px; + margin-top: 12px; + padding: 8px 0; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 8px; + box-shadow: 0 5px 10px rgba(0,0,0,.2); +} + +.tt-suggestion { + padding: 3px 20px; + font-size: 18px; + line-height: 24px; +} + +.tt-suggestion.tt-cursor { + color: #fff; + background-color: #0097cf; + +} + +.tt-suggestion p { + margin: 0; +} \ No newline at end of file diff --git a/resources/build/build.php b/resources/build/build.php deleted file mode 100644 index 3cba6ca..0000000 --- a/resources/build/build.php +++ /dev/null @@ -1,120 +0,0 @@ -" --catch ERR_ALL="btw_license_error" "*.php"', - LICENSE_FILE, - PROJECT_ID, - PROJECT_KEY -); -system($sgCommand);*/ - -echo 'Creating the release archive...' . PHP_EOL . PHP_EOL; - -// Initialize archive object -$zip = new ZipArchive(); -$zip->open(sprintf('%s/blue-twilight_%s.zip', dirname($appRoot), $argv[1]), ZipArchive::CREATE | ZipArchive::OVERWRITE); - -/** @var SplFileInfo[] $files */ -$files = new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($appRoot), - RecursiveIteratorIterator::LEAVES_ONLY -); - -foreach ($files as $name => $file) -{ - // Skip directories (they will be added automatically) and unnecessary files - if (!$file->isDir()) - { - // Get real and relative path for current file - $filePath = $file->getRealPath(); - $relativePath = substr($filePath, strlen($appRoot) + 1); - - // See if the file matches any of ignore patterns - $includeFile = true; - if ( - strlen($relativePath) < strlen('vendor') || - substr($relativePath, 0, strlen('vendor')) != 'vendor' - ) - { - array_walk($ignoredFiles, function ($value) use ($relativePath, &$includeFile) - { - $includeFile &= !(preg_match('/^' . preg_quote($value, '/') . '$/', $relativePath)); - }); - } - - // Add to the archive - if ($includeFile) - { - $zip->addFile($filePath, sprintf('blue-twilight_%s/%s', $argv[1], $relativePath)); - } - } -} - -$zip->close(); - -echo PHP_EOL . PHP_EOL; -echo 'All done!'; -echo PHP_EOL . PHP_EOL; -exit(); - -?> diff --git a/resources/lang/en/forms.php b/resources/lang/en/forms.php index b776119..fb3e4ac 100644 --- a/resources/lang/en/forms.php +++ b/resources/lang/en/forms.php @@ -7,6 +7,7 @@ return [ 'apply_action' => 'Apply', 'bulk_edit_photos_label' => 'Bulk edit selected photos:', 'bulk_edit_photos_placeholder' => 'Select an action', + 'can_create_albums_label' => 'User can create new albums', 'cancel_action' => 'Cancel', 'continue_action' => 'Continue', 'create_action' => 'Create', diff --git a/resources/views/themes/base/admin/create_user.blade.php b/resources/views/themes/base/admin/create_user.blade.php index 59a6cae..525b9b2 100644 --- a/resources/views/themes/base/admin/create_user.blade.php +++ b/resources/views/themes/base/admin/create_user.blade.php @@ -86,6 +86,13 @@ +
+ +
+
@lang('forms.cancel_action') diff --git a/resources/views/themes/base/admin/edit_user.blade.php b/resources/views/themes/base/admin/edit_user.blade.php index 77086c7..4aaf6d6 100644 --- a/resources/views/themes/base/admin/edit_user.blade.php +++ b/resources/views/themes/base/admin/edit_user.blade.php @@ -97,6 +97,13 @@
+
+ +
+ @if (!$user->is_activated)