Fwd: PloneSoftwareCenter DOAP



Okay, purely in the name of paranoia, I added a failing test to remind me, and confuse the others, about the "All Platforms" bug. It's not a major bug, but the DOAP spec says " Operating system that a project is limited to.  Omit this property if the project is not OS-specific."

Now, I guess I can add a fix in my branch. I was also wondering, if I do something like this

security.declareProtected(permissions.View, 'getPlatformVocab')
    def getPlatformVocab(self):
        """Get the platforms available for selection via acquisition from
        the top-level projects container.
        """
        allPlatformsTranslation =
self.translation_service.utranslate('PloneSoftwareCenter', 'All platforms')
        allPlatforms = ('All platforms', allPlatformsTranslation)
       
return DisplayList([allPlatforms , (item, item) for item in self.getAvailablePlatforms()])

Do I still need to migrate the content?

Or better, the only migration I should do is to make sure to delete "All platforms" from the availablePlatforms in every PloneSoftwareCenter object in my portal, but that would be all.

Other things I should do (I'm mainly posting my thoughts here for future reference) is:
* Change the default content of availablePlatforms in PloneSoftwareCenter and add a validator that doesn't accept "All platforms" in any of the lines
* Make sure "All platforms" gets correctly translated in templates (using the view)
* And that's all, I guess

My opinion is that is quite some work, that the whole stuff is still prone to user misconfigurations (Imagine one user unknowingly adding "All operating systems" to his PSC configuration: and all I said above becomes completely useless).

I'm extremely confused over the issue. I would like to know the list opinion, if anybody has some.

Oi, my head hurts


--
Simone Deponti
-------------------------------------------
- Oh wait, which ones are we Linux guys again, Rebels or Empire?
- Microsoft is the Empire. Apple is the Rebels. We are the Ewoks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]