change ci to pass
This commit is contained in:
@@ -1,15 +1,17 @@
|
|||||||
image: lorisleiva/laravel-docker:latest
|
image: lorisleiva/laravel-docker:latest
|
||||||
|
|
||||||
|
# https://lorisleiva.com/laravel-deployment-using-gitlab-pipelines/
|
||||||
|
|
||||||
# Replace the last line with the following lines if you'd rather
|
# Replace the last line with the following lines if you'd rather
|
||||||
# leave StrictHostKeyChecking enabled (replace yourdomain.com):
|
# leave StrictHostKeyChecking enabled (replace yourdomain.com):
|
||||||
#
|
#
|
||||||
# ssh-keyscan yourdomain.com >> ~/.ssh/known_hosts
|
# ssh-keyscan yourdomain.com >> ~/.ssh/known_hosts
|
||||||
# chmod 644 ~/.ssh/known_hosts
|
# chmod 644 ~/.ssh/known_hosts
|
||||||
|
|
||||||
.change_file_permissions: &change_file_permissions |
|
.change_file_permissions: &change_file_permissions |
|
||||||
find . -type f -not -path "./vendor/*" -exec chmod 664 {} \;
|
find . -type f -not -path "./vendor/*" -exec chmod 664 {} \;
|
||||||
find . -type d -not -path "./vendor/*" -exec chmod 775 {} \;
|
find . -type d -not -path "./vendor/*" -exec chmod 775 {} \;
|
||||||
|
|
||||||
composer:
|
composer:
|
||||||
stage: build
|
stage: build
|
||||||
cache:
|
cache:
|
||||||
@@ -48,11 +50,14 @@ codestyle:
|
|||||||
dependencies: []
|
dependencies: []
|
||||||
script:
|
script:
|
||||||
- phpcs --standard=PSR2 --extensions=php --ignore=app/Support/helpers.php app
|
- phpcs --standard=PSR2 --extensions=php --ignore=app/Support/helpers.php app
|
||||||
|
|
||||||
phpunit:
|
phpunit:
|
||||||
stage: test
|
stage: test
|
||||||
dependencies:
|
dependencies:
|
||||||
- composer
|
- composer
|
||||||
script:
|
script:
|
||||||
- phpunit --coverage-text --colors=never
|
- phpunit --coverage-text --colors=never
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- storage/
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ class EventPolicy
|
|||||||
} else {
|
} else {
|
||||||
$testedUser = $event->guests()->where('users.id', $user->id)->first();
|
$testedUser = $event->guests()->where('users.id', $user->id)->first();
|
||||||
if ($testedUser !== null) {
|
if ($testedUser !== null) {
|
||||||
if($testedUser->pivot->is_staff) {
|
if ($testedUser->pivot->is_staff) {
|
||||||
return $testedUser->pivot->is_staff;
|
return $testedUser->pivot->is_staff;
|
||||||
} else if (!$event->private) {
|
} elseif (!$event->private) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user