-
User visits web application.
- User can view resource availability as unauthenticated user (availability recorded in web app database).
-
User logs in to web application.
- User information is authenticated against library SIP2 server:
- On failure: user is prompted to re-enter information
- On success:
- User's supplementary information (e.g., name) is added to web app database (unless exists). Password (PIN) is not saved to web app database.
- User account is created in ActiveDirectory (unless already exists). AD password is created from user's PIN (all information passed over SSL). Group and logon hours set to none.
- User information is authenticated against library SIP2 server:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DCINSTALL] | |
SafeModeAdminPassword=<%= @admin_password %> | |
RebootOnCompletion=Yes | |
ReplicaOrNewDomain=domain | |
NewDomain=forest | |
NewDomainDNSName=<%= @domain_name %> | |
ForestLevel=3 | |
DomainLevel=3 | |
InstallDNS=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/ldap' | |
module AdHelper | |
class Connector | |
NO_LOGON_HOURS = '0' * 168 | |
def initialize | |
config_file = Dir.glob("#{Rails.root}/config/**/ad.yml").first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestsController < ApplicationController | |
# GET /tests | |
# GET /tests.json | |
def index | |
@tests = Test.all | |
respond_to do |format| | |
format.html # index.html.erb | |
format.json { render json: @tests } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Description < ActiveRecord::Base | |
belongs_to :user | |
belongs_to :product | |
belongs_to :document | |
# attr_accessible :title, :body | |
validate :check_limit | |
def check_limit | |
if self.class.where(:user_id => self.user_id).count >= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module PSTerminalServices | |
Function OctetToHours ($Octet) | |
{ | |
# Function to convert Octet value (byte array) into binary string | |
# representing logonHours attribute. The 168 bits represent 24 hours | |
# per day for 7 days, Sunday through Saturday. The values are converted | |
# into local time. If the bit is "1", the user is allowed to logon | |
# during that hour. If the bit is "0", the user is not allowed to logon. | |
$Bias = (Get-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\TimeZoneInformation).Bias |
Create an xconf file at [dspace-src]/dspace/modules/xmlui/src/main/resources/META-INF/cocoon/avalon/cocoon-core-saxon-xslt.xconf
and add the following lines:
<?xml version="1.0" encoding="UTF-8"?>
<components>
<component role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon"
class="org.apache.cocoon.components.xslt.TraxProcessor">
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env jruby | |
require 'csv' | |
DSPACE_CFG = 'path to your dspace.cfg' | |
DSPACE_DIR = File.expand_path('../..', DSPACE_CFG) | |
DSPACE_JARS = Dir[File.join(DSPACE_DIR, 'lib/*.jar')] | |
ADMIN_EMAIL = 'your admin email' | |
OUTPUT = '/tmp/rp.csv' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r tmp1/myapp/config/application.rb tmp2/myapp/config/application.rb | |
3,12c3 | |
< require "rails" | |
< # Pick the frameworks you want: | |
< require "active_model/railtie" | |
< require "active_job/railtie" | |
< # require "active_record/railtie" | |
< require "action_controller/railtie" | |
< require "action_mailer/railtie" | |
< require "action_view/railtie" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r tmp3/myapp/config/application.rb tmp2/myapp/config/application.rb | |
3,12c3 | |
< require "rails" | |
< # Pick the frameworks you want: | |
< require "active_model/railtie" | |
< require "active_job/railtie" | |
< require "active_record/railtie" | |
< require "action_controller/railtie" | |
< require "action_mailer/railtie" | |
< require "action_view/railtie" |