Open commanderinchief opened 8 years ago
Hello
Why do you say redactors cant manage posts (dreate, edit, publish) ? They can ! But only their posts with their medias. Try redac@la.fr account (with redac password).
Regards
In localhost Redactors is working properly. But Not Working and shown "This Action is Unauthorized" message at my web hosting.
Are you sure sessions are working fine on your production server ?
I'm not sure session is working fine. I don't know how to check and fix. Please teach me Sir.
Make sure your server meets the following requirements:
PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
Is authentication working ?
My Server is running with PHP 5.6 and Extension are installed as following Pic. What I need to do now?
Error Message is here.
I cant see the OpenSSL PHP Extension but I dont think this is related.
Authorization is set in app/Policies/PostPolicy.php :
public function change(User $user, Post $post)
{
return $user->id === $post->user_id;
}
There we check if authenticated user is post owner.
You should debug there to know what happens.
I see this file and code is same as you shown. How to do? I don't know. May be something wrong with Webhost. Localhost is OK.
Dump the variables :
dd($user->id);
And
dd($post->user_id);
You should have the same value there.
It's shown number 6 and post owner ID also 6.
So I dont understand your error 403...
May be something is mising in Webhost server or Role Permission need to fix. I don't know how to fix it. And How to rewrite role permissions?
Redactor accounts can't either edit post or publish. I do like to give Redactors to those permission. How to fix the role permission? Please teach me Sir.