Archive for the 'review' Category

plone.app.changeownership

Mustapha Benali (Headnet), in collaboration with Matt Hamilton (Netsight) and Roel Bruggink (Four digits), made a nice plone package called plone.app.changeownership. Since we are using plone  ‘as a service’  at our university for a lot of different sites with a lot of different users, this was something we were waiting for… so time for a small test…

What happens to content created (owned) by a certain user on a plone site when he/she leaves the organisation? Will they be able to still access the content when they are gone? even when we’ve taken away all their plone rights? Unfortunately our test showed us the answer is yes! In plone a lot of permissions are given to you because you are the owner of a piece of content. When you create a piece of contents that automatically sets you as the owner of this object. We had the situation where we had almost a whole site created by someone who then left after a year of the site being live, so we decided to just go to the plone_control_panel and take away all the rights that this user had (contributor, editor, member, reader, reviewer). To our surprise this didn’t help a bit, when that users who has no rights what so ever in the plone site, he/she can still change everything. Since we use ldap and shibboleth for authentication and authorisation it doesn’t pose a big problem when a person really leaves, since they just can’t log in anymore. But of course, when a person changes position within the organisation, the user account is still active so then it could become a serious problem.

In general, being an owner means having more permissions than the assigned roles indicate. This “priviledged” dealing with ownership is confusing and even sometimes dangerous for testing other functionalities.

So we needed a solution that would make it possible to change the ownership of all (or part of the) content on a plone site with just the click of a button basically. And from what I’ve seen plone.app.changeownership does just that.

ZMI options:

Note1: There is an option in the ZMI, tab Ownership which allows you to ‘Take ownership’ for an object and optionally all its sub-objects. The problem with this option for us is that no one (besides a couple of people from the development team) is allowed in the zmi, so we can only give ownership to the zope-admin. Also we would have to do this manually for each item of the plone site which is just way too time consuming in our setup.

Note2: Along with the ‘Take ownership’ option in zmi there is a possibility to replace the owner via Security tab -> Local roles. The major insufficiency of both options though is that they work on one object only. There is no way to change ownership recursively or in batch on a site. (Thanks Yulia)

What plone.app.ownership does?

  • It adds an option to the Control Panel called ‘Change Ownership’:

controlpanelbutton

  • It automically shows you all available users in your site and allows you to limit your changes to a given path.
  • You can do a dry run of the change in ownership which shows you what items will be adjusted:

dryrun

  • The results are easily visible when you use the Standard View in your site/folders.

before:

before

after:

after

collective.uploadify

 Installation

  • add collective.uploadify to your eggs and zcml section in buildout
  • run buildout

 What it does

After install, go to http://your-plone-site/@@upload

This gives you a place where you can browse for files, select files on your computer and upload them to your plone site.

Screenshots:

uploadify-browse.png uploadify-upload.png uploadify-uploading.png uploadify-result.png

Notes

Doesn’t contain a Generic Setup profile, but is easily addable in any policy package or just addable in the ZMI.

See more info on pypi page:

If you want to smoothly integrate the upload funtionality to your site, consider to add the following lines
to your policy product in the profiles/default/actions.xml:
or simply go to the Zope Management Interface -> portal_actions -> object and add a new CMF Action Category
from the dropdown and configure it with the following lines:

The pypi page also mentions that you can set site_properties, you have to manually add site properties in the ZMI (yoursite/portal_properties/site_properties) or in your policy package.

uploadify-siteprops.png

Changing the form action in PloneFormGen

Last week I came across a use case for someone wanting to use our Plone based service to make a form go to a different url, in this case just posting your name to an online testing service (UsolveIt) for a specific test.

Not having tested much with PloneFormGen, we thought this could be interesting, so we gave it a shot. We already knew it was a great package, but I’d still like to say thanks to the brilliant people at OneNorthWest for providing yet another solution for our use case without us having to ask for it or start programming. The PloneFormGen package has not just one, but several ways to override a form action.

Here I’ll just write out our specific use case, but more info on the great possibilities of this package can be found at:

First step is to make a form with only one field. Makes ure you have full (Plone) manager rights before you start.

  • Add a form folder and remove all fiels but the subject.
  • Rename the subject to something like Name
  • Our form then looks like this:

result.png

  • Make sure you have the usolveit test already set up and have the url, including test-id ready
  • Edit the form folder and go to the tab Overrides

customaction.png

  • The full succes action should look something like:
redirect_to:python:'http://www.usolvit.be/servlet/toets.servlets.PdfRegistratie?
domein=WISK&toets=A000000A0000&naamStudent='+request.form['naam']
  • When the form is finished, you can click the Start test button and the browser will open a new tab with the test:

urlusolvit.png

usolvitview.png

plonetheme.cleantheme

Just thought is might be handy to see a screenshot for some themes that get posted on pypi.

So here’s a first:

cleantheme

This looks very clean, for me it would have been even nicer if you were able to add more than two line of actual content before you run out of screen space. Usability wise it’s not a good idea to have to go scrolling just to read the contents of your site. But I have to say that the big header thing is apparently popular, since I’ve been seeing them popup everywhere the last year or so. Some examples: Plone.org itself and De Redactie (newssite from Belgium). And while I’m typing this I suddenly realize that even this blog has a big header, but unfortunately I can’t easily change that either :-(

link_redirect_view

In Plone 3.3 there’s finally a solution for redirects, or at least there is for most of our use cases ;-)

There’s an extra option available in your Site Setup – Types (/@@types-controlpanel) where you can say that when you add a Link to your site,  this will automatically redirect instead of just showing the link address.

p3_redirectlink

This is also visible in the ZMI/portal_types where the default view for a link is then set to link_redirect_view instead of link_view.

If you set this option, the short name of your link can then function as a redirect.

So, for our usecase: site/index_en.php should redirect to site/english/, we just add a link named index_en.php and as a url we add the full path to the english folder. When people than surf to yoursite/index_en.php, they will automatically get redirected to the english part of the site.

Note: Remember that this only works when you are logged out. If you have rights to edit the link, of course you have to see it first so you can click Edit to change the address if needed.

Plone redirects

 Use case: an old url (index_en.php) should automatically get redirected to the new plone_site/english/index. Since this is in a folder you can’t use the short name, also not a link with a short name because a standard plone link doesn’t automatically redirect (only in navigation).

Redirection tool

Installation:

  • add Products.RedirectionTool to your eggs and zcml section in buildout
  • run buildout
  • add a Plone site in the ZMI with the Products.RedirectionTool profile selected

What it does

This tool adds a tab to your global toolbar where you can add an alias for every object inside your Plone site.For example, you can make sure this way that your old index.php and index.html links keep working although your page in Plone is now named (short name) welcome.

After installation you see a tab Aliases:

rt_aliasestab.png

In this tab you can add aliases you want to have for the object you are on (context):

rt_add.png

collective.redirect

http://pypi.python.org/pypi/collective.redirect

Installation:

  • add collective.redirect to your eggs and zcml section in buildout
  • run buildout
  • add a Plone site in the ZMI with the Install collective.redirect profile selected

What it does

This package adds a content type called Redirect.

You can name (short name) this link anything you want but not the starting point of your redirection (e.g. if you want index_en.php to get redirected to your english folder, don’t use index_en.php as a short name for this redirect.)

cr_add.png

The value in Local path will get redirected to what you put in URL. In our case we want to make index_en.php to go to the english folder in our plone site (rtcr)/english). Make sure you add the name of the plone site if it’s an internal link.

  • from Local Path
  • To: URL

You can also redirect to external url’s. E.g. if you want yoursite/kuleuven to automatically send you to http://www.kuleuven.be. This option makes it possible to arrange some of your apache url rewrites for you.

plone.app.redirector

http://pypi.python.org/pypi/plone.app.redirector

not tested yet, will come later on…

Plone 3.3  – new link view

In Plone 3.3 they will add a new link view: link_redirect_view. You will be able to select your desired link view in the site setup. You can see what view is being used in ZMI/portal_types/link. Still need to test this to see if it is useful for us.

More info in the next post: link_redirect_view

PloneFlashUpload

I’ve been testing some packages in Plone (3.2 and/or 3.3rc’s) and thought it migth be handy to put the results into my blog so our team and the rest of the world can review this. Here’s a first attempt…

PloneFlashUpload

This package makes it possible for your users to upload multiple files (documents and images) at once from their computer into the plone site.

Installation:

  • add Products.PloneFlashUpload to your eggs and zcml section in buildout
  • run buildout
  • add a Plone site in the ZMI with the PloneFlashUpload profile selected

What it does?

After installation you can see a tab Upload in the toolbar of your plone site.

upload-tab.png

In that screen you can browse your computer using the select-files-knop.png button

upload-screen.png

Then select several files you want to upload and click Open:

select-files-browse.png

You can see the files being uploaded:

upload-progress.png

The result: All uploaded files are added to your website.

upload-result.png

Notes

  • Tested on: Plone  3.2.2, IE7 and FF3.0.11
  • Uploaded following file formats without problems: jpg, png, pdf, doc, ppt, mp3, inc, css, php.
  • Uploading an html-file appears to work (upload completed) but doesn’t show up anywhere in the contents of your site. This package is meant for images and documents, not for webrelated files (html, php, asp,…).
  • There is a maximum size to files that you upload, you can change these settings in zope.conf (cgi-maxlen 0).For more information see this formpost on markmail.One of my files was over 9MB so that should be more than enough…
  • There’s also a section on FlashUpload in your Site Setup which lets you add content types that are available for upload. Adding Document to this list makes it possible to upload html-files for example, but they only show the source code so it’s not usable as an import-tool

uPerform

In the ongoing search for a decent documentation tool we’re testing several products.

The first one I tested was RWD uPerform ( http://www.rwd.com/products/rwduperform/)

The company RWD has an alliance with SAP Education and is therefore very suited for creating documentation for SAP applications.  Unfortunately when using the tool with Mozilla Firefox or other ‘exotic’ (the quotes are meant to be ironic)it doesn’t recognise any labels and your resulting document is filled with very strangeterms.

In short, it creates a written manual (documentation) that describes all the actions for a particular use case, every step accompanied by a screenshot (full screen or label).The document is a .udc file (uPerform document) but can be ‘published’ (not exported) as a Word document, Powerpoint file, PDF, XML and some other formats.

As an example I tried to create a short document that explains how you add a page to a Plone site. Plone is an open source web content management system (http://plone.org) that we’re currently setting up and adapting for the K.U.Leuven. You can see the result in the attachment uPerform Work Instruction

Testing steps:

  • Click Start -  All Programs – RWD uPerform – RWD uPerform Express
  • Click New – Recording (upperleft red button)
  • Press the ‘Record’ button on the small window
  • After recording the action you want documented click the ‘Stop’ button (right next to the record button)
  • You will be redirected to the ‘Simulation’ tab, at the bottom of the application scree, change this to the tab ‘Document’
  • There you will see several parts (Purpose, Configuration information, Test information, ASAP BPP, Exercise/Data Sheet, Screen flow and Procedure)
  • For the manual you’ll probably only need the Procedure part. I tried deleting the content I didn’t need, but it’s easier just to select the right block when publishing and then deleting the content in another application like Word (at least if you’re unfamiliar with the program lika I am).
  • To get this .udc file into another format, click File – Publish filename.udc
  • Then you get a list of every block and it’s format (export) options. Select ‘Work Instruction’ , this will give you just the purpose, screenflow, procedure and result blocks.
  • Select the destination and click ‘Publish’.

It should also be possible to publish a simulation (like a short film of what you did) but for some reason the export to Flash didn’t work on my computer. I might report on this later on.

Overall I didn’t think it was very ‘user-friendly’, I had to click around a lot to find even the simplest thing. When you finally find out the right workflow it does what it needs to do (and also a lot of stuff it doesn’t but those are called features ;-)

If you’re starting documentation on something web-based in Internet Explorer it might be usefull to save you some time in creating all those screenshots needed for manuals, but for me that was about the only thing I needed it do, so there…