frappe / wiki

Free and Open Source Wiki built on top of Frappe
https://frappe.io/wiki
MIT License
238 stars 195 forks source link

Wiki not loading for user without System Admin and Wiki Approval role #172

Closed nilpatel42 closed 1 year ago

nilpatel42 commented 1 year ago

When i add Wiki Approval Permission but i tick "if created by" then it not working, it show many redirect error Wiki version : v2.0.0 (version-14) ERPNext : v14.27.12 (version-14) Frappe Framework : v14.40.0 (version-14)

In Firefox image

and i also add code in terminal

/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:45 web.1            |   return_val = func(*args, **kwargs)
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /login?redirect-to=http%3A%2F%2F192.168.1.147%3A8000%2Fwiki%2Fabout-abc HTTP/1.1" 301 -
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /wiki/about-abc HTTP/1.1" 301 -
17:52:45 web.1            | /home/abc/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:45 web.1            |   return_val = func(*args, **kwargs)
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /login?redirect-to=http%3A%2F%2F192.168.1.147%3A8000%2Fwiki%2Fabout-abc HTTP/1.1" 301 -
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /wiki/about-abc HTTP/1.1" 301 -
17:52:45 web.1            | /home/abc/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:45 web.1            |   return_val = func(*args, **kwargs)
17:52:45 web.1            | /home/abc/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:45 web.1            |   return_val = func(*args, **kwargs)
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /login?redirect-to=http%3A%2F%2F192.168.1.147%3A8000%2Fwiki%2Fabout-abc HTTP/1.1" 301 -
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /website_script.js HTTP/1.1" 200 -
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /wiki/about-abc HTTP/1.1" 301 -
17:52:45 web.1            | /home/abc/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:45 web.1            |   return_val = func(*args, **kwargs)
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /login?redirect-to=http%3A%2F%2F192.168.1.147%3A8000%2Fwiki%2Fabout-abc HTTP/1.1" 301 -
17:52:45 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:45] "GET /wiki/about-abc HTTP/1.1" 301 -
17:52:46 web.1            | /home/abc/frappe-bench/apps/frappe/frappe/utils/caching.py:57: DeprecationWarning: `frappe_last` argument is deprecated and will be removed in v15.
17:52:46 web.1            |   return_val = func(*args, **kwargs)
17:52:46 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:46] "GET /login?redirect-to=http%3A%2F%2F192.168.1.147%3A8000%2Fwiki%2Fabout-abc HTTP/1.1" 301 -
17:52:46 web.1            | 192.168.1.210 - - [17/Jul/2023 17:52:46] "GET /wiki/about-abc HTTP/1.1" 301 -

This code run repetitively when i refresh or trying to get wiki page

BreadGenie commented 1 year ago

Sorry I didn't get what you meant by "if created by" in the description. Can you elaborate a bit more on that?

nilpatel42 commented 1 year ago

Sorry I didn't get what you meant by "if created by" in the description. Can you elaborate a bit more on that?

sorry its If only Creator

BreadGenie commented 1 year ago

Sorry but where is the "it's if only creator" field at?

nilpatel42 commented 1 year ago

Sorry but where is the "it's if only creator" field at?

in role permission manager, every permission have this checkbox

Screenshot_20230717_195918_Brave.jpg

BreadGenie commented 1 year ago

In what doctype did you change it? I enabled the "Only if Creator" from role perm manager to all wiki doctypes and it works fine for me (opened it as guest too)

nilpatel42 commented 1 year ago

In what doctype did you change it? I enabled the "Only if Creator" from role perm manager to all wiki doctypes and it works fine for me (opened it as guest too)

BreadGenie commented 1 year ago

Are you trying to make it so that the creators of the page only can view the wiki page?

If yes that's not the purpose of Wiki. It's supposed to host content/documentation that's supposed to be shared among others (public or within your team (read no guests allowed))

Since it's designed with that in mind you'll have troubles trying to use Wiki that way

nilpatel42 commented 1 year ago

okay i understand i want share docs within my team but why user not access wiki when wiki approver or admin role not assign if i am correct without that both role wiki must accessible to users who have login credentials to ERPNext

Thank you

BreadGenie commented 1 year ago

if i am correct without that both role wiki must accessible to users who have login credentials to ERPNext

You're right the pages can be made inaccessible to only guests atm.

There's an ongoing issue #60 that tracks the feature that you want.