예제 #1
0
    def home(self):
        if not c.user:
            h.redirect_to(controller='user', action='login')

        is_new = not h.check_access('package_create')

        if is_new:
            return h.redirect_to(controller='package', action='search')
        return h.redirect_to(
            controller='ckanext.canada.controller:CanadaController',
            action='links')
예제 #2
0
    def home(self):
        if not c.user:
            h.redirect_to(controller='user', action='login')

        is_new = not h.check_access('package_create')

        if is_new:
            return h.redirect_to(controller='package', action='search')
        return h.redirect_to(
            controller='ckanext.canada.controller:CanadaController',
            action='links')
예제 #3
0
def notice_no_access():
    '''flash_notice if logged-in user can't actually do anything yet'''
    if h.check_access('package_create'):
        return

    h.flash_notice(
        '<strong>' + _('Account Created') + '</strong><br>' +
        _('Thank you for creating your account for the Open '
          'Government registry. Although your account is active, '
          'it has not yet been linked to your department. Until '
          'the account is linked to your department you will not '
          'be able to create or modify datasets in the '
          'registry.') + '<br><br>' +
        _('You should receive an email within the next business '
          'day once the account activation process has been '
          'completed. If you require faster processing of the '
          'account, please send the request directly to: '
          '<a href="mailto:[email protected]">'
          '[email protected]</a>'), True)
예제 #4
0
def notice_no_access():
    '''flash_notice if logged-in user can't actually do anything yet'''
    if h.check_access('package_create'):
        return

    h.flash_notice(
        '<strong>' + _('Account Created') +
        '</strong><br>' +
        _('Thank you for creating your account for the Open '
          'Government registry. Although your account is active, '
          'it has not yet been linked to your department. Until '
          'the account is linked to your department you will not '
          'be able to create or modify datasets in the '
          'registry.') +
        '<br><br>' +
        _('You should receive an email within the next business '
          'day once the account activation process has been '
          'completed. If you require faster processing of the '
          'account, please send the request directly to: '
          '<a href="mailto:[email protected]">'
          '[email protected]</a>'), True)