Translations: English
Search on Docs:
ActionItem Search:

#2105: Disable models

Type: FeatureItem Feature: SocialNetwork Tags: colivre
ScheduledFor: N/A Assigned to:   Sites:  
Priority: 0 Status: Pending  

Today when a user is disabled by inapropiate behavior or when the account was not activated yet, Noosfero hide by setting visible=false and changing its password, but there is no real way to disable profiles. The profile should be notified when some env admin disable then.

Its is necessary to review all fields related to it, like: active, validated, visible, enabled and blocked.

Also, environment admin needs a way to browse in disabled profiles.

  • Disabled users shouldn't login
  • All content, comment and tracked actions should be hide
  • Profile itself should not be listed among others profiles

-- JoenioCosta - 20 Oct 2011

I've made some contributions to [ProfileFlags] that may help with the use of fields to implement this

-- BraulioBhavamitraBO - 23 Oct 2011

We noticed that is necessary to have this "disable" behaviour to all of our models. So we'll now extend this ActionItem to be "Disable Models", instead of "Disable Profiles".

The "disabled" status means that the model is completely inaccessible to common users. Only the environment administrators and the "owner" of the model will be able to see this models. All of the visualizations of the disabled models must contain any visual information that indicates the disabled status. Also, in every disabled model must be a way (button, link, etc;) to enable the model again or ask for reenable (in the case of the owner of de model). For example, if I have a blog and the administrator disabled my blog, I, as the owner of the blog, must be able to see it.

Every model that is considered "son" of another, carries the father's disabled status (disabled or not).

All the models with this hability will have methods #disable and #enable that, respectively, disables and enables itself and all it's children.

The features that already implements some kind of behaviour alike this one (abuse report, email confirmation on sign up) must be refactored to work accordingly with this specification.

It's desirable that every list of objects retrieved from the database be transparently filtered, based on the correct disabled status, according to the user. This will avoid the need of remembering to filter every query.

Every disabled model can't have any new child created. It's frozen until reenabled. For so, there must be a way of each model define what models are its children and the contrary too. Also, there must be a way to change the permissions of the files that are child of a disabled folder. For example, if the administrator disable a folder due to inappropriate files, this files will still be accessible on Apache level. The proposal for this problem is to iterate recursively over the folder change the permission of each file, since our file sctructure does not preserves Noosfero's file structure.

-- RodrigoSouto

Oops, the link hadn't worked: ProfileFlags I think this really look like a soft delete problem, which is very problematic do solve.

I advice you to look for default_scope (there is a port for rails 2.1). But maybe it is not the case for it, cause this disabled behavious make them still visible but limited.

Of the 4 flags we have in ProfileFlags, the one it is completely useless is activated. The name is not totally nice for this case; but also a flag disabled would conflict with the enabled, which means something different, for enterprises, but this may be the solution for the Profile model and maybe other models.

Really don't know, just brainstorming…

-- BraulioBhavamitraBO - 06 Nov 2011
Add comment
You need to login to be able to comment.

ActionItemForm edit

Title Disable models
ActionItemType FeatureItem
Priority Low
Tags colivre
Feature SocialNetwork
ScheduledFor N/A
Status Pending
Ticket SAC:
Topic revision: r1 - 22 May 2015, UnknownUser

irc Talk with Devs Now!

Copyright © 2007-2019 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres