Updated 036 Setting Site View Permission (markdown)
parent
6008db16a9
commit
e89faf037d
@ -20,4 +20,4 @@ The next step that we have to try and address this problem, is some custom scrip
|
|||||||
|
|
||||||
Let's look at the code level. Here we have the access file open of sermon distributor, and if we do a search: site. [00:07:00](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m00s) You will see that it has the site access values set for the component. When we look at the front end of the component, open categories, you see that here it is asking whether the user has that access, and if it doesn't, it does a redirect, then redirects to the default page. Let's open the default page. [00:07:32](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m32s) The ideal of the default page, is that if the default page is not the site route, it cannot access the default page. It will add this error, and redirect to the site root, which being the websites homepage. That's how we trying to prevent this permission structure from interfering with your user experience.
|
Let's look at the code level. Here we have the access file open of sermon distributor, and if we do a search: site. [00:07:00](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m00s) You will see that it has the site access values set for the component. When we look at the front end of the component, open categories, you see that here it is asking whether the user has that access, and if it doesn't, it does a redirect, then redirects to the default page. Let's open the default page. [00:07:32](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m32s) The ideal of the default page, is that if the default page is not the site route, it cannot access the default page. It will add this error, and redirect to the site root, which being the websites homepage. That's how we trying to prevent this permission structure from interfering with your user experience.
|
||||||
|
|
||||||
Now if we go back to the sermon distributor component, [00:08:10](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m10s) and we again open the site views, this time I change it that is doesn't have access. I save it that way. Go to the compiler, compile sermon distributor and install. Let's go back to the code. You'll see that it doesn't have any of that checks in the preachers file [00:08:57](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m57s) only in the category file. It still redirects to preachers, which in effect means that this one will no longer give any errors, but it will show these('COM_SERMONDISTRIBUTOR_NOT_AUTHORISED_TO_VIEW_CATECORIES'),'errors'); errors, which relates to the fact that they cannot see the categories. I think some of the advancements that we might still think on doing, is maybe add a field to the component, where the user can change these errors [00:09:31](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m31s) to show maybe a message of how to purchase access or something. You do realize that at this stage JCB does have the the option to customize any section of code by using what is known as the custom code implementation. I'm not going to demonstrate that, please go look and review those videos. They are on YouTube where you can literally change this whole code block here, and then use your own implementation upon these measures. [00:10:10](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m10s) Well that is a a quick demonstration or explanation on how to manage the different permission structures for JCB regarding the site front-end. If you do not want that control, you can simply just put it off. I realize that most of you might want to add some custom scripting that adds permissions to the database for that component. That's little bit beyond the scope of where JCB is at the moment. Although that is a nice to have, there are more pressing things that we'll focus on.
|
Now if we go back to the sermon distributor component, [00:08:10](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m10s) and we again open the site views, this time I change it that is doesn't have access. I save it that way. Go to the compiler, compile sermon distributor and install. Let's go back to the code. You'll see that it doesn't have any of that checks in the preachers file [00:08:57](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m57s) only in the category file. It still redirects to preachers, which in effect means that this one will no longer give any errors, but it will show these ('COM_SERMONDISTRIBUTOR_NOT_AUTHORISED_TO_VIEW_CATECORIES'),'errors'); errors, which relates to the fact that they cannot see the categories. I think some of the advancements that we might still think on doing, is maybe add a field to the component, where the user can change these errors [00:09:31](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m31s) to show maybe a message of how to purchase access or something. You do realize that at this stage JCB does have the the option to customize any section of code by using what is known as the custom code implementation. I'm not going to demonstrate that, please go look and review those videos. They are on YouTube where you can literally change this whole code block here, and then use your own implementation upon these measures. [00:10:10](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m10s) Well that is a a quick demonstration or explanation on how to manage the different permission structures for JCB regarding the site front-end. If you do not want that control, you can simply just put it off. I realize that most of you might want to add some custom scripting that adds permissions to the database for that component. That's little bit beyond the scope of where JCB is at the moment. Although that is a nice to have, there are more pressing things that we'll focus on.
|
||||||
|
Loading…
Reference in New Issue
Block a user