Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to Edit Role Permission #71

Open
commanderinchief opened this issue Sep 23, 2016 · 13 comments
Open

Want to Edit Role Permission #71

commanderinchief opened this issue Sep 23, 2016 · 13 comments

Comments

@commanderinchief
Copy link

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.

@bestmomo
Copy link
Owner

Hello

Why do you say redactors cant manage posts (dreate, edit, publish) ? They can ! But only their posts with their medias. Try [email protected] account (with redac password).

Regards

@commanderinchief
Copy link
Author

In localhost Redactors is working properly.
But Not Working and shown "This Action is Unauthorized" message at my web hosting.

@bestmomo
Copy link
Owner

Are you sure sessions are working fine on your production server ?

@commanderinchief
Copy link
Author

I'm not sure session is working fine.
I don't know how to check and fix.
Please teach me Sir.

@bestmomo
Copy link
Owner

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 ?

@commanderinchief
Copy link
Author

commanderinchief commented Sep 24, 2016

My Server is running with PHP 5.6 and Extension are installed as following Pic.
What I need to do now?
php

@commanderinchief
Copy link
Author

Error Message is here.
error2

@bestmomo
Copy link
Owner

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.

@commanderinchief
Copy link
Author

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.

@bestmomo
Copy link
Owner

Dump the variables :

dd($user->id);

And

dd($post->user_id);

You should have the same value there.

@commanderinchief
Copy link
Author

commanderinchief commented Sep 25, 2016

It's shown number 6 and post owner ID also 6.

@bestmomo
Copy link
Owner

So I dont understand your error 403...

@commanderinchief
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants