Skip to content

Commit

Permalink
[api] remove unused function package_create?
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Oct 29, 2012
1 parent a664790 commit bd0bad7
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/api/lib/opensuse/permission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,6 @@ def package_change?( package, project=nil )
return false
end

def package_create?( obj )
logger.debug "User #{@user.login} wants to change the package"


# Get Package object
if obj.kind_of? Package
prj = obj.db_project
elsif obj.kind_of? Project
prj = obj
elsif obj.kind_of? String
prj = Project.find_by_name( obj )
else
raise RuntimeError, "Unhandle object type"
end

if pkg.nil?
raise "unable to find package object for #{project} / #{package}"
end

return true if @user.can_create_package_in?( prj )
return false
end

def method_missing( perm, *args, &block)

logger.debug "Dynamic Permission requested: <#{perm}>"
Expand Down

0 comments on commit bd0bad7

Please sign in to comment.