You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Joe Meadows <ja...@webopolis.com> on 2007/10/08 18:48:31 UTC
Prevent user from deleting blog
Hi,
When a new user registers at our site we use AAPP to create a new Roller
user and a weblog. The user and blog are both created using the user
name of the new site user so that new-user's blog will be
http://oursite.com/roller/new-user. I've also set groupblogging.enabled
to false. The problem is that the user may delete this default blog and
then create a new one using any available handle which we'd like to
prevent. Actually, it's fine if the user wants to delete their blog,
say to get a fresh start, so long as the recreated blog uses the same
handle that we originally designated. I haven't found any configuration
options that can help with this, are there any settings or workarounds
that can help with this?
TIA,
Joe Meadows
Re: Prevent user from deleting blog
Posted by Joe Meadows <ja...@webopolis.com>.
Hi Dave,
> BTW, I was thinking that alternative would be to have the username as
> part of the path, then they could create as many blogs as they like
> which would be accessible in for form of
> http:/site.com/roller/username/blog1. In fact that might be nicer
> than just allowing one hardcoded blog per user, does that sound
> reasonable?
I think I have a decent solution for this. I modified
CreateWebsiteAction.java slightly. When the user tries to create a new
blog it checks if the new handle matches the user name, if it does it
just lets it go through unchanged, if it doesn't match then the handle
is prepended with the username, i.e. username_myNewBlog. This way the
user can delete and recreate their default blog (handle name = username)
and create multiple blogs without potentially colliding with other user
names.
Thanks again for your help.
Cheers!
Joe
Re: Prevent user from deleting blog
Posted by Joe Meadows <ja...@webopolis.com>.
> I don't know of any way to config Roller to support that. Modifying
> Roller to support that would almost certainly require a Java code
> change (and thus require a new build). One possible work-around is to
> disable weblog removal by removing the delete option from the Weblog
> Settings page, that would only require a JSP change, which you could
> potentially do yourself without creating your own custom build.
>
> - Dave
>
Hi Dave,
Thanks for your help. The JSP change would be easy but my concern with
that is that someone could hack around it by entering in the correct
URL, or would that not be possible with Roller? I'm already setup to
build Roller from source and don't mind making Java changes, so long as
it's not too huge of a project. I should probably ask this on the
developers' list, but if you've got a quick pointer to where the change
should be code I'd be grateful.
BTW, I was thinking that alternative would be to have the username as
part of the path, then they could create as many blogs as they like
which would be accessible in for form of
http:/site.com/roller/username/blog1. In fact that might be nicer than
just allowing one hardcoded blog per user, does that sound reasonable?
Thank you,
Joe
Re: Prevent user from deleting blog
Posted by Dave <sn...@gmail.com>.
On 10/8/07, Joe Meadows <ja...@webopolis.com> wrote:
> When a new user registers at our site we use AAPP to create a new Roller
> user and a weblog. The user and blog are both created using the user
> name of the new site user so that new-user's blog will be
> http://oursite.com/roller/new-user. I've also set groupblogging.enabled
> to false. The problem is that the user may delete this default blog and
> then create a new one using any available handle which we'd like to
> prevent. Actually, it's fine if the user wants to delete their blog,
> say to get a fresh start, so long as the recreated blog uses the same
> handle that we originally designated. I haven't found any configuration
> options that can help with this, are there any settings or workarounds
> that can help with this?
I don't know of any way to config Roller to support that. Modifying
Roller to support that would almost certainly require a Java code
change (and thus require a new build). One possible work-around is to
disable weblog removal by removing the delete option from the Weblog
Settings page, that would only require a JSP change, which you could
potentially do yourself without creating your own custom build.
- Dave