- golem15.faq plugin (Requires golem15.translate), table golem15_faq_faqs with the PHP columns - FAQ model with jsonable content and the translate Locale relation - admin controller golem15.faq.faqs: name, slug, locale, active switch, richeditor description, question repeater - navigation FAQ (order 500), permission golem15.faq.faqs, en and pl phrasebooks - TestFaqAdminSmoke: answers stored sanitized with a notice under content.1.answer
20 lines
566 B
Go
20 lines
566 B
Go
package faq
|
|
|
|
import (
|
|
"git.golem15.com/golem15/sm-faq-plugin/controllers"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
)
|
|
|
|
// Permissions is the plugin's Winter registerPermissions() catalog: the PHP
|
|
// code golem15.faq.faqs on the developer and publisher roles.
|
|
func (*Plugin) Permissions() []pact.Permission {
|
|
return []pact.Permission{{
|
|
Code: controllers.PermissionFAQs,
|
|
Tab: "golem15.faq::lang.plugin.name",
|
|
Label: "golem15.faq::lang.permissions.faqs",
|
|
Roles: []string{"developer", "publisher"},
|
|
}}
|
|
}
|
|
|
|
var _ pact.HasPermissions = (*Plugin)(nil)
|