@@ -0,0 +1,2026 @@
+# Copyright 2011 the Melange authors.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#   http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0A%22%22%22Module for the GCI delete account page.%22%22%22%0A%0Afrom soc.logic import delete_account%0A%0Afrom soc.views.helper import url_patterns%0A%0Afrom soc.modules.gci.logic import profile as profile_logic%0Afrom soc.modules.gci.views import base%0Afrom soc.modules.gci.views.helper.url_patterns import url%0A%0A%0Aclass ModerateDeleteAccountPage(base.GCIRequestHandler):%0A  %22%22%22View for the GCI delete account page.%0A  %22%22%22%0A%0A  def templatePath(self):%0A    return 'v2/modules/gci/moderate_delete_account/base.html'%0A%0A  def djangoURLPatterns(self):%0A    return %5B%0A        url(r'admin/delete_account/%25s$' %25 url_patterns.PROFILE,%0A            self, name='gci_moderate_delete_account')%0A    %5D%0A%0A  def checkAccess(self):%0A    self.check.isHost()%0A%0A    self.mutator.profileFromKwargs()%0A%0A  def context(self):%0A    profile = self.data.url_profile%0A%0A    return %7B%0A        'page_name': 'Moderate delete account requests',%0A        'profile': profile,%0A        'has_tasks': profile_logic.hasTasks(profile),%0A        'has_created_or_modified_tasks': profile_logic.hasCreatedOrModifiedTask(%0A            profile),%0A        'has_task_comments': profile_logic.hasTaskComments(profile),%0A        'has_other_gci_profiles': profile_logic.hasOtherGCIProfiles(profile),%0A        'has_other_gsoc_profiles': profile_logic.hasOtherGSoCProfiles(profile),%0A        %7D%0A%0A  def post(self):%0A    delete_account.confirm_delete(self.data.url_profile)%0A    self.redirect.program().to('gci_moderate_delete_account', validated=True)%0A

Implement the view class required to moderate account deletion requests.