Permalink
Browse files

Add force publish anything to the user used by the force publisher

  • Loading branch information...
h-lame authored and heathd committed Mar 27, 2013
1 parent a542c9d commit 5f0ebd0f6ebf4f5217c0c7c7d53544d8564234be
@@ -0,0 +1,8 @@
+force_publish_robot_user = ForcePublisher::Worker.new.user
+if force_publish_robot_user.nil?
+ puts "User for Force Publisher is not present! - can't escalate permissions!"
+else
+ puts "Allowing User for Force Publisher (#{force_publish_robot_user.name}[#{force_publish_robot_user.id}]) to force publish anything"
+ force_publish_robot_user.permissions << User::Permissions::FORCE_PUBLISH_ANYTHING
+ force_publish_robot_user.save!
+end

0 comments on commit 5f0ebd0

Please sign in to comment.