Adobe AEM 6.4.x: How to restrict which components can be added on the page (using static templates)? - aem

We have a need to restrict certain authors access to components.
example: The restricted authors can only add the image and rich text editor components on the page.
The only thing I can think of is denying access to the component (e.g. /apps/myapps/component/xxx).
additional info:
We're using static templates.
restrictions will be applied to a group and then the group will then be given to the restricted users. Currently using Netcentric ACLs to manage this.
Any ideas on how to make it work? Thanks

I am not sure if this can be solved with ACLs.
The only way might be to intercept the request to
/etc/designs/YOUR-PROJECT/DESIGNFILE/_jcr_content.json/
And then manipulate the json structure based on the current user's groups.
Although this will solve the problem, I do not like this kind of solution at all...
HTH anyway.

Related

How does one make TYPO3 generate different output for backend users?

I would like to output additional data in most content elements (mostly fluid_styled_content) in the frontend for logged-in backend users (editing links for the CEs, additional information). The first idea was to insert additional Fluid code within <f:be.security.ifAuthenticated>. In theory this does the right thing, but the result is cached (bad: BE users might not see the additional data, others might see it). How does one work around this?
Ideas:
Use different templates for BE users. How?
Disable writing to and reading from the cache for BE users. How?
(Automatically) Assign a FE user group to BE users, because the cache should create different entries for each FE user group. How?
Render the additional output using JavaScript and get the data separately. Caching could work for all users, but complicated and would still require some way to discriminate between BE-/non-BE users. Would prefer not to implement this.
Requirements for a solution:
FE caching should continue to work for users which are not logged into the BE.
Caching for BE users does not necessarily have to work, but would be nice-to-have.
The output does not need to differ further between users.
You could deactivate the page cache for logged in backend users with a TypoScript condition:
[backend.user.isLoggedIn]
config.no_cache = 1
[global]
That seems excessive and there should be better solutions.
Ideas:
Add a cacheTag depending on BE login state (this would enable caching for all users)
disable caching in your content element definition's TypoScript by wrapping the FLUIDTEMPLATE in a COA_INT (see this SO post) (this would only disable caching for that FLUIDTEMPLATE)
Can <f:cache.disable> around the condition help? I found these to have no effect in plain content elements (FLUIDTEMPLATE), though.
Can <vhs:render.uncache> help?
I guess what you are looking for is called "frontend editing" - it is available as an extension that can be found here: https://extensions.typo3.org/extension/frontend_editing

AEM Personalisation without Target integration

I have a requirement to personalise the banner content of my site homepage depending on the other site sections (segments) a visitor has previously and/or most commonly visited.
My site is basically split into 3 sections SectionA/SectionB/SectionC. Assuming a visitor frequents the SectionA most often, one would assume I could class them into sectionA segment. Likewise for the other site sections. Each of my site sections is Tagged with the name of that section.
The idea is that next time the visitor visits the my homepage, the content displayed would then be personalised to match the segment they are assumed to belong too.
I have plenty of experience personalising content with Adobe Target, but next to zero without. Am I right in thinking this can be achieved via clientContext or contextHub?
PS: I have managed to get this working with contextHub tagCloud with segments based on tagCount>n, however this uses session storage by default and I can't find a way to configure persistent storage short of writing code to override the OOTB tagcloud store. Ideally, I'd like to write a persistent cookie and have my segment resolve based on the cookie value.
Any assistance would be appreciated.
Please have a look at this Adobe Helpx article :- https://helpx.adobe.com/experience-manager/using/personal.html
You can find good answers by expert on AEM at Adobe AEM forum:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.html
I hope this will help you.
Thanks and Regards
Kautuk Sahni

How to add custom attributes in GitHub issues?

We are trying to use GitHub for issue tracking in one of our projects and while its very simply to use, we aren't sure its powerful enough at the same time to fulfil our needs to organize our issue management since we can't find a way to customize it.
Question: Is it possible to add custom attributes in GitHub for issue tracking, search/sort and export the list of issues with those attributes? For example, we'd like to add and use following attributes:
External Issue ID: There is an external list of issues/change requests maintained by a separate group that we need to associate
our issues with and need a field to specify the external issue ID.
Priority: so that we can easily discuss and prioritize what we want to tackle first
Severity: to identify impact on the system
Type of Issue: Bug, Change Request, New Requirement
Class: Performance, Security, Function, Compliance etc.
Source: to track whether issue was reported by a specific customer (which could be in hundreds), end user, internal team,
partner etc.
Date Opened: I think this is maintained internally by GitHub but not exposed anywhere in the UI
Date Closed
etc.
We understand some of these can be implemented with labels but there would be too many of them to assign and they do not allow exclusivity (for example you can only specify one priority - high, medium, or low assigning - to an issue)
Any ideas if and how this can be implemented in GitHub?
If not, any recommendations?
Thanks!
As you mentioned already, this so far is only done by using labels, for example the way i do priority is having multiple labels:
Priority: Blocker
Priority: High
....
Yes, unfortunately this feature is not intended to exclusively select one value per category as these are labels.
There is a github issue that proposes a new feature to GitHub so that we can have a Priority attribute in every GitHub issue right here
https://github.com/isaacs/github/issues/472
Not sure about all the other custom attributes, but maybe this would be a good start for your idea.
There does not seem to be a way to create custom parameters. You may be able to do this by storing the data inline in the text of the issue and then parsing that issue text programatically, but that's kind of a hack.
For instance, if you wanted to link a GitHub issue to an internal bug tracker like JIRA, just use the JIRA issue name in the text of the GitHub issue and then write a regular expression to parse it back out. This requires a little bit of extra plumbing on top of GitHub.
Date opened and closed are available in the API. See documentation.
(Incidentally, I'd note that the lack of customisation and complexity is a key feature of GitHub's issue tracking system: it is designed for developers, not project managers who want to tweak it into a confusing JIRA-like hellscape of misery.)
Update June 2021: you could use custom fields for those attributes!
New beta features within GitHub Issues, with better ways to plan, track, and manage projects.
Read more on the GitHub Issues page or in the FAQ.
✨ NEW – Project planning for developers
Available in limited public beta
Built like a spreadsheet, project tables give you a live canvas to filter, sort, and group issues and pull requests.
Tailor them to your needs with custom fields and saved views.
Sign up for the beta now.
That includes:
Extend issues with custom fields with support for text, number, date and single-select types
Change custom field values right from the issues sidebar
Filter, sort, and group by any field
Use tags
Most of the time you can put the kinds of things you want in the body of the issue as text or use a tag for things like priority. You only need to set priority if it's not the default one.

What separates a content management system from just a bunch of web pages?

I have a website that has related pages. They have links that point back and forth to one another but I have no integrated system, nor do I know what that would mean.
What is the minimum code that a group of web pages must have to be considered a Content Management System (CMS). Is it that all the settings are in the database and the pages are generated somehow? Is there some small snippet that all my pages could share that makes them a CMS, database or not?
Thanks. I was also hoping not to have to study a giant CMS to see what makes it a CMS . After maybe a basic understanding I would know what I was looking for.
edit: here's why I ask about code. Whenever I have looked at a CMS, and maybe they aren't all the same, I saw that to develop a module you always had to inherit from certain classes and had some necessary code. I didn't know if there was some magic model that I just don't get that all cms makers understand.
edit: perhaps my question is more about being extendable or pluggable. What would a minimum look like? Is it possible to show that here?
edit: how about this? Is something a CMS if it is not extendable and/or pluggable?
I think this is really impossible to say. We all manage content. The "system" is just whatever mechanism you use to do so(dragging and dropping in Explorer or committing content changes via a SQL query). To say there is a minimum amount of code needed really isn't indicative. What is indicative is how often you find yourself making mistakes and how easy it is for a given user of a given skill level and knowledge to execute the functions in the designed system. That tells you the quality/degree of what you have in place being worthy of being called a "CMS."
Simply put a CMS is an application that allows the user to publish and edit existing web content.
In response to the edit:
A "good" CMS allows of extensibility. By using inheritence you can extend the functionality of a CMS outside of the core components provided. That's the magic.
About Extensibility:
Depending on the language/framework you want to build your CMS with, you can load pages or controls(ASP.NET) using command built into the framework. Typically what is being done is a parent class/interface is being defined that forces an module that is to be developed to follow some given standards:
Public MustInherit Class CMSModule
'Here you will define properties and functions that need to be global to all modules being developed to extend your CMS.
public property ModuleName as string
End Class
public class PlugInFooCMSPage
inherits CMSModule
end class
Then it's just a matter of simply loading a module dynamically in whatever construct a given language/framework provides.
Ultimately, a CMS is a system that lets you manage content, so it needs an user interface that is dedicated to letting you easily create, edit and delete pages on your website.
However, it's fairly usual to expect from a CMS to provide a browser-based WYSIWYG page editor, file uploading, image resizing, url rewriting, page categories and tags, user accounts (editor, moderator, administrator), and some kind of templae system.
Without dragging you into a theoretical explanation of what a CMS is and what it's not, perhaps some tutorials on the building methodology of a CMS will help you better understand.
http://css-tricks.com/php-for-beginners-building-your-first-simple-cms/
http://www.intranetjournal.com/php-cms/
A Content Management System is a System that Manages Content. :)
So if you got many pages that share the same layout, you can create a system that stores the content into a database and when a page is requested, it gets that content, merges it with a template that contains the page header, menu, etc.. and outputs the result.
The basis idea is that you don't want to copy HTML pages, and have to edit hundreds of them when you want to change your layout.
Such a system can be very complex, featuring wysiwyg editors, toolbars, version control, multiple user publishing and much more, but it could be as simple as a single page behind a standard loging, that contains only an input field for the title and a textarea in which you type the html content.

joomla multiple site content distribution

I'm just starting to evaluate joomla CMS as a tool to build out my personal site. I'd like to manage multiple sites/domains with one copy of joomla on one host. so I'll own mysite.com and myothersite.com, which will both point to the same host/joomla code. If I do this I need to be able to set which domain/site the content I add shows up on. For some sites the content will be on both for others it will be on only one. What would be ideal it to have some kind of filtering mechanism so I don't have to manually set where the content goes.
What would be ideal is for me to set tags on the content and each site can specify which taged content to show.
My last requirement is that I be able to have different pages on each site.
Is this possible or am I asking too much from a "free" CMS?
Thanks all
I don't know if there's a component that achieves what you're describing here. I use a multi-language component in some of my sites that shows translations, but it doesn't "suppress" articles that doesn't have references to a translation: it just says "No translations to this article". I know you're not asking for translations methods, but I think the Joomfish way of selecting content based in a chosen language would be what you wanted, but not based in languages, just domains.
The only component I know it would be able to suppress articles based in pre defined parameters (in its case the language), is the Joomfish's "Table Localization Plugin", but you need to be a Joomfish silver member paying $60 to Joomfish's developers.
You could write a component(see here for plugin documentation), that analyzing the domain, would suppress articles that shouldn't appear in that specific domain. But I think it's going yo be a lot of work. You would learn a lot of Joomla's architecture, though.
How Joomla displays its content (output) is controlled entirely by parameters. So if you can control what parameters are loading, you can create multiple displays per host
However, that may be overkill in this case. You can just easily hack your template. Just make it load a different menu for siteA and siteB. (The host is set in $_SERVER['HTTP_HOST'])
The menu on siteA could have a tagging component item, set to display articles tagged siteA.com. The siteB will have the same for its domain.
While there are extensions that will do what you describe (http://extensions.joomla.org/extensions/core-enhancements/multiple-sites), Joomla is really designed for one site at a time. I've done setups where I use the same codebase for Joomla and manage it with version control, but I always end up launching multiple sites with individual databases.
However, I don't know of any CMS that inherently allows you to share articles across instances while keeping the data centralized. You may be looking at an extension (or your own customization) regardless of which platform you pick.
We had a similar problem with needing to share content across multiple Joomla! sites so we developed this extension: http://extensions.joomla.org/extension/simple-sharing
It is not very robust in terms of what it can share but it does let you share Articles across multiple sites and choose which sites and categories those articles get published into. I hope it works for you.
Thanks!