File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Release Notes for Isolate
2
2
3
+ ## 1.3.1 - 2020-06-10
4
+
5
+ ### Fixed
6
+ - Don't run Isolate event when a user is not signed in or it is invoked via console commands/migrations
7
+
3
8
## 1.3.0 - 2020-06-09
4
9
5
10
### Changed
Original file line number Diff line number Diff line change 2
2
"name" : " trendyminds/isolate" ,
3
3
"description" : " Restrict your Craft CMS users on a per-entry basis" ,
4
4
"type" : " craft-plugin" ,
5
- "version" : " 1.3.0 " ,
5
+ "version" : " 1.3.1 " ,
6
6
"keywords" : [
7
7
" permissions" ,
8
8
" entry permission" ,
Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ function(RegisterUserPermissionsEvent $event) {
119
119
Entry::class,
120
120
Entry::EVENT_AFTER_SAVE ,
121
121
function (ModelEvent $ event ) {
122
+ // Don't do anything if this is a console request
123
+ if (Craft::$ app ->getRequest ()->isConsoleRequest ) {
124
+ return false ;
125
+ }
126
+
127
+ // Don't do anything if the user is not signed in
128
+ if (Craft::$ app ->getUser ()->isGuest ) {
129
+ return false ;
130
+ }
131
+
122
132
// If the user isn't isolated
123
133
if (!Isolate::$ plugin ->isolateService ->isUserIsolated (Craft::$ app ->getUser ()->id )) {
124
134
return false ;
You can’t perform that action at this time.
0 commit comments