shell bypass 403

UnknownSec Shell


name : CourseForumAnswerPolicy.php
<?php

namespace App\Policies;

use App\Models\CourseForum;
use App\Models\Api\CourseForumAnswer;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class CourseForumAnswerPolicy
{
    use HandlesAuthorization;

    /**
     * Create a new policy instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    public function pin(User $user, CourseForumAnswer $courseForumAnswer)
    {
        return $courseForumAnswer->course_forum->webinar->isOwner($user->id);
    }

    public function resolve(User $user, CourseForumAnswer $courseForumAnswer)
    {
        return ($courseForumAnswer->course_forum->webinar->isOwner($user->id)  or $courseForumAnswer->course_forum->user_id==$user->id );
    }

    /**
     * Determine whether the user can update the model.
     *
     * @param \App\User $user
     * @param \App\Models\CourseForum $courseForum
     * @return mixed
     */
    public function update(User $user,CourseForumAnswer $courseForumAnswer)
    {

        return  $courseForumAnswer->user_id==$user->id ;
    }



}

© 2025 UnknownSec
A-Z Web Programming | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
A-Z Web Programming

A-Z Web Programming

in Web Development
4.75
(1 Ratings)
Created by Linda Anderson

Share

Share course with your friends

Buy with points