Discussion:
[Erp5-dev] how to really hide some allowed portal types
Mikolaj Antoszkiewicz
2007-11-27 14:46:54 UTC
Permalink
Hello,

Is there a way of modifying the stock Allowed Portal Types list without
using Hidden Portal Types and modifying stock BusinessTemplate?

Or the other way, is there a 'proper' way of stopping 'New' icon on the
module form (Folder_create()) from creating random object from Allowed
Portal Types list, even though it is hidden?

Regards
Mikolaj
Mikolaj Antoszkiewicz
2007-11-27 14:47:08 UTC
Permalink
Hello,

Is there a way of modifying the stock Allowed Portal Types list without
using Hidden Portal Types and modifying stock BusinessTemplate?

Or the other way, is there a 'proper' way of stopping 'New' icon on the
module form (Folder_create()) from creating random object from Allowed
Portal Types list, even though it is hidden?

Regards
Mikolaj
Yoshinori Okuji
2007-11-27 17:10:26 UTC
Permalink
Post by Mikolaj Antoszkiewicz
Is there a way of modifying the stock Allowed Portal Types list without
using Hidden Portal Types and modifying stock BusinessTemplate?
Or the other way, is there a 'proper' way of stopping 'New' icon on the
module form (Folder_create()) from creating random object from Allowed
Portal Types list, even though it is hidden?
You can fix the tales expression in the page template, so that when no portal
type is allowed, no new icon is shown.

YO
--
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org
Mikolaj Antoszkiewicz
2007-11-28 10:37:02 UTC
Permalink
Post by Yoshinori Okuji
Post by Mikolaj Antoszkiewicz
Is there a way of modifying the stock Allowed Portal Types list without
using Hidden Portal Types and modifying stock BusinessTemplate?
Or the other way, is there a 'proper' way of stopping 'New' icon on the
module form (Folder_create()) from creating random object from Allowed
Portal Types list, even though it is hidden?
You can fix the tales expression in the page template, so that when no portal
type is allowed, no new icon is shown.
YO
That's a good idea. Although I'm in a situation where I have 2 out of 5
portal types hidden, and when I click the new icon the hidden type gets
created.

Is there any other way besides patching or overwriting Folder_create()
method?

Mikolaj
Yoshinori Okuji
2007-11-28 20:54:28 UTC
Permalink
Post by Mikolaj Antoszkiewicz
Post by Yoshinori Okuji
Post by Mikolaj Antoszkiewicz
Is there a way of modifying the stock Allowed Portal Types list without
using Hidden Portal Types and modifying stock BusinessTemplate?
Or the other way, is there a 'proper' way of stopping 'New' icon on the
module form (Folder_create()) from creating random object from Allowed
Portal Types list, even though it is hidden?
You can fix the tales expression in the page template, so that when no
portal type is allowed, no new icon is shown.
YO
That's a good idea. Although I'm in a situation where I have 2 out of 5
portal types hidden, and when I click the new icon the hidden type gets
created.
This sounds like a bug.
Post by Mikolaj Antoszkiewicz
Is there any other way besides patching or overwriting Folder_create()
method?
I think Folder_create should use only visible portal types, because this
script is used from the UI, and it doesn't make sense to create a hidden
portal type implicitly.

In short: please send a patch to fix Folder_create. :)

YO
--
Yoshinori Okuji, Nexedi CTO
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Full Featured High End Open Source ERP
http://www.erp5.com
ERP5 Wiki: Developer Zone for ERP5 Community
http://www.erp5.org
Loading...