Compare commits
	
		
			2 Commits
		
	
	
		
			b5db913c24
			...
			8ccbd5000d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						8ccbd5000d
	
				 | 
					
					
						|||
| 
						
						
							
						
						a52b148101
	
				 | 
					
					
						
@@ -4,6 +4,7 @@ namespace App\Models;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
 | 
			
		||||
use Illuminate\Database\Eloquent\Relations\HasMany;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
 | 
			
		||||
@@ -36,4 +37,9 @@ final class CaptchaToken extends Model
 | 
			
		||||
    {
 | 
			
		||||
        return $this->hasMany(Captcha::class);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function user(): BelongsTo
 | 
			
		||||
    {
 | 
			
		||||
        return $this->belongsTo(User::class);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@ namespace App\Services\Private;
 | 
			
		||||
use App\Dto\Builder\CaptchaToken as CaptchaTokenDto;
 | 
			
		||||
use App\Dto\QuerySettingsDto;
 | 
			
		||||
use App\Dto\Request\Private\CaptchaToken\StoreUpdate;
 | 
			
		||||
use App\Helpers\Helpers;
 | 
			
		||||
use App\Models\User;
 | 
			
		||||
use App\Models\CaptchaToken;
 | 
			
		||||
use App\Repositories\CaptchaTokenRepository;
 | 
			
		||||
@@ -133,6 +134,10 @@ final class CaptchaTokenService extends Service
 | 
			
		||||
            return $this->errFobidden(__('Access is denied'));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (Helpers::isDemoModeAndUserDenyUpdate($modelCaptchaToken->user)) {
 | 
			
		||||
            return $this->errValidate(__('Demo Mode'));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            DB::transaction(function () use ($modelCaptchaToken) {
 | 
			
		||||
                $this->captchaTokenHandler->handleDestroy($modelCaptchaToken);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								resources/captcha/backgrounds-body/license/license.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								resources/captcha/backgrounds-body/license/license.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg
 | 
			
		||||
 | 
			
		||||
https://github.com/wenlng/go-captcha/blob/master/LICENSE
 | 
			
		||||
 | 
			
		||||
MIT License
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2021 go-captcha
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
in the Software without restriction, including without limitation the rights
 | 
			
		||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 | 
			
		||||
copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in all
 | 
			
		||||
copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
			
		||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
			
		||||
SOFTWARE.
 | 
			
		||||
		Reference in New Issue
	
	Block a user