• T
    Authorize user before creating/updating a protected branch. · 6d841eaa
    Timothy Andrew 提交于
    1. This is a third line of defence (first in the view, second in the
       controller).
    
    2. Duplicate the `API::Helpers.to_boolean` method in `BaseService`. The
       other alternative is to `include API::Helpers`, but this brings with it
       a number of other methods that might cause conflicts.
    
    3. Return a 403 if authorization fails.
    6d841eaa
base_service.rb 1.7 KB