Tatsuki SUGIURA
sugi****@users*****
2006年 7月 12日 (水) 20:41:55 JST
Index: slashjp/plugins/ResKey/ResKey/Checks/AL2/AnonNoPost.pm diff -u /dev/null slashjp/plugins/ResKey/ResKey/Checks/AL2/AnonNoPost.pm:1.1 --- /dev/null Wed Jul 12 20:41:55 2006 +++ slashjp/plugins/ResKey/ResKey/Checks/AL2/AnonNoPost.pm Wed Jul 12 20:41:55 2006 @@ -0,0 +1,38 @@ +# This code is a part of Slash, and is released under the GPL. +# Copyright 1997-2005 by Open Source Technology Group. See README +# and COPYING for more information, or see http://slashcode.com/. +# $Id: AnonNoPost.pm,v 1.1 2006/07/12 11:41:55 sugi Exp $ + +package Slash::ResKey::Checks::AL2::AnonNoPost; + +use warnings; +use strict; + +use Slash::ResKey::Checks::AL2; +use Slash::Utility; +use Slash::Constants ':reskey'; + +use base 'Slash::ResKey::Key'; + +our($VERSION) = ' $Revision: 1.1 $ ' =~ /\$Revision:\s+([^\s]+)/; + +sub doCheck { + my($self) = @_; + + my $user = getCurrentUser(); + my $form = getCurrentForm(); + + # this check assumes only one AC uid, and doesn't accept any + # other UIDs to be provided + + if ($user->{is_anon} || $form->{postanon}) { + return AL2Check( + $self, 'nopost', + { uid => getCurrentAnonymousCoward('uid') }, + ); + } else { + return RESKEY_NOOP; + } +} + +1; Index: slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPost.pm diff -u /dev/null slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPost.pm:1.1 --- /dev/null Wed Jul 12 20:41:55 2006 +++ slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPost.pm Wed Jul 12 20:41:55 2006 @@ -0,0 +1,24 @@ +# This code is a part of Slash, and is released under the GPL. +# Copyright 1997-2005 by Open Source Technology Group. See README +# and COPYING for more information, or see http://slashcode.com/. +# $Id: NoPost.pm,v 1.1 2006/07/12 11:41:55 sugi Exp $ + +package Slash::ResKey::Checks::AL2::NoPost; + +use warnings; +use strict; + +use Slash::ResKey::Checks::AL2; +use Slash::Utility; +use Slash::Constants ':reskey'; + +use base 'Slash::ResKey::Key'; + +our($VERSION) = ' $Revision: 1.1 $ ' =~ /\$Revision:\s+([^\s]+)/; + +sub doCheck { + my($self) = @_; + return AL2Check($self, 'nopost'); +} + +1; Index: slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPostAnon.pm diff -u /dev/null slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPostAnon.pm:1.1 --- /dev/null Wed Jul 12 20:41:55 2006 +++ slashjp/plugins/ResKey/ResKey/Checks/AL2/NoPostAnon.pm Wed Jul 12 20:41:55 2006 @@ -0,0 +1,24 @@ +# This code is a part of Slash, and is released under the GPL. +# Copyright 1997-2005 by Open Source Technology Group. See README +# and COPYING for more information, or see http://slashcode.com/. +# $Id: NoPostAnon.pm,v 1.1 2006/07/12 11:41:55 sugi Exp $ + +package Slash::ResKey::Checks::AL2::NoPostAnon; + +use warnings; +use strict; + +use Slash::ResKey::Checks::AL2; +use Slash::Utility; +use Slash::Constants ':reskey'; + +use base 'Slash::ResKey::Key'; + +our($VERSION) = ' $Revision: 1.1 $ ' =~ /\$Revision:\s+([^\s]+)/; + +sub doCheck { + my($self) = @_; + return AL2Check($self, 'nopostanon'); +} + +1; Index: slashjp/plugins/ResKey/ResKey/Checks/AL2/NoSubmit.pm diff -u /dev/null slashjp/plugins/ResKey/ResKey/Checks/AL2/NoSubmit.pm:1.1 --- /dev/null Wed Jul 12 20:41:55 2006 +++ slashjp/plugins/ResKey/ResKey/Checks/AL2/NoSubmit.pm Wed Jul 12 20:41:55 2006 @@ -0,0 +1,24 @@ +# This code is a part of Slash, and is released under the GPL. +# Copyright 1997-2005 by Open Source Technology Group. See README +# and COPYING for more information, or see http://slashcode.com/. +# $Id: NoSubmit.pm,v 1.1 2006/07/12 11:41:55 sugi Exp $ + +package Slash::ResKey::Checks::AL2::NoSubmit; + +use warnings; +use strict; + +use Slash::ResKey::Checks::AL2; +use Slash::Utility; +use Slash::Constants ':reskey'; + +use base 'Slash::ResKey::Key'; + +our($VERSION) = ' $Revision: 1.1 $ ' =~ /\$Revision:\s+([^\s]+)/; + +sub doCheck { + my($self) = @_; + return AL2Check($self, 'nosubmit'); +} + +1;