Permalink
Browse files

updatding readme.

  • Loading branch information...
1 parent b07ccb9 commit ff0dd614b300009245abae0025280d0d41b6e5d2 Paul Hoehne committed May 7, 2009
Showing with 27 additions and 0 deletions.
  1. +27 −0 README.md
View
27 README.md
@@ -33,6 +33,9 @@ production:
Example
=======
+Inside of your <code>application_controller.rb</code> file, you might include something like the
+following:
+
<pre>
java_access_manager
@@ -48,5 +51,29 @@ def get_current_user
end
</pre>
+You may need to adjust the following lines of code in "vendor/plugins/java\_access\_manager/lib/java\_access\_manager.rb"
+to do the "right thing" from you application's perspective:
+
+<pre>
+def get_user_information
+ the_person = nil
+ user_id = ""
+ role_string = ""
+
+ if access_manager_environment["use_authority"] == "stubbed"
+ user_id = access_manager_environment["stubbed_user"]["user_id"]
+ else
+ user_id = request.env["HTTP_USER_ID"]
+ end
+
+ unless user_id.blank? or user_id == "anonymous"
+ the_person = Person.find_by_username(user_id)
+ else
+ the_person = Person.new(:username => 'anonymous', :first_name => 'anonymous', :last_name => 'user')
+ end
+ return the_person
+end
+</pre>
+
Copyright (c) 2008 Saturn Flyer, LLC, released under the MIT license

0 comments on commit ff0dd61

Please sign in to comment.