Example #1
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)

        idea = h.fetch_obj(Idea, id, new_id=True)
        terms = ['sep_dir'] 

        h.update_obj(idea, terms, request.params)

        return self.view(id)
Example #2
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)

        idea = h.fetch_obj(Idea, id, new_id=True)
        terms = ['sep_dir'] 

        h.update_obj(idea, terms, request.params)

        return self.view(id)
Example #3
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        journal = h.fetch_obj(Journal, id)
        terms = ['openAccess', 'URL', 'ISSN', 'noesisInclude', 'student', 'active']

        h.update_obj(journal, terms, request.params)

        return self.view(id)
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        school_of_thought = h.fetch_obj(SchoolOfThought, id)
        terms = ['sep_dir']

        h.update_obj(school_of_thought, terms, request.params)

        return self.view(id)
Example #5
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        thinker = h.fetch_obj(Thinker, id)
        terms = ['sep_dir', 'wiki']

        h.update_obj(thinker, terms, request.params)

        return self.view(id)
Example #6
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        thinker = h.fetch_obj(Thinker, id)
        terms = ['sep_dir', 'wiki'] 

        h.update_obj(thinker, terms, request.params)

        return self.view(id)
Example #7
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        work = h.fetch_obj(model.Work, id)
        terms = ['sep_dir'] 

        h.update_obj(work, terms, request.params)

        return self.view(id)
Example #8
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        school_of_thought = h.fetch_obj(SchoolOfThought, id)
        terms = ['sep_dir'] 

        h.update_obj(school_of_thought, terms, request.params)

        return self.view(id)
Example #9
0
    def update(self, id=None):
        if not h.auth.is_logged_in():
            abort(401)
        if not h.auth.is_admin():
            abort(403)

        journal = h.fetch_obj(Journal, id)
        terms = [
            'openAccess', 'URL', 'ISSN', 'noesisInclude', 'student', 'active'
        ]

        h.update_obj(journal, terms, request.params)

        return self.view(id)
Example #10
0
    def update(self, id, terms=None):
        if not h.auth.is_logged_in():
            response.status_int = 401
            return "Unauthorized"
        if not h.auth.is_admin():
            response.status_int = 403
            return "Forbidden"

        # if no whitelist is passed in, go with default
        if terms is None:
            terms = ["sep_dir", "searchstring", "label"]

        entity = h.fetch_obj(self._type, id)
        h.update_obj(entity, terms, request.params)

        # Check for redirect
        if request.params.get("redirect", False):
            h.redirect(h.url(controller=self._controller, action="view", id=entity.ID))
        else:
            # Issue an HTTP success
            response.status_int = 200
            return "OK"
Example #11
0
    def update(self, id, terms=None):
        if not h.auth.is_logged_in():
            response.status_int = 401
            return "Unauthorized"
        if not h.auth.is_admin():
            response.status_int = 403
            return "Forbidden"

        #if no whitelist is passed in, go with default
        if terms is None:
            terms = ['sep_dir', 'searchstring', 'label']

        entity = h.fetch_obj(self._type, id)
        h.update_obj(entity, terms, request.params)

        # Check for redirect
        if request.params.get('redirect', False):
            h.redirect(
                h.url(controller=self._controller, action='view', id=entity.ID))
        else:
            # Issue an HTTP success
            response.status_int = 200
            return "OK"