File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,17 +170,18 @@ public function table(Table $table): Table
170170 return Gate::check ('rollbackVersion ' , [$ this ->getOwnerRecord (), $ record ]);
171171 })
172172 ->visible (function (Model | ContentVersion $ record ) {
173- // Check 1 - Can visible if is allow rollback on current license
174173 if (! app (LicenseManager::class)->canRollbackVersion ()) {
175174 return false ;
176175 }
177176
178- // Check 2 - Can visible if not a latest version
177+ return true ;
178+ })
179+ ->disabled (function (Model | ContentVersion $ record ) {
179180 if ($ this ->getCurrentContentVersion ()?->getKey() === $ record ->getKey ()) {
180- return false ;
181+ return true ;
181182 }
182183
183- return true ;
184+ return false ;
184185 })
185186 ->action (function (Model | ContentVersion $ record , TableAction $ action ) {
186187 try {
You can’t perform that action at this time.
0 commit comments