* VRFS-1457 - resolved two issues; invited users will be able to invite, and the error path will show errors

This commit is contained in:
Seth Call 2014-03-15 16:47:21 +00:00
parent 964fcb5f0e
commit b783d270b1
4 changed files with 7 additions and 7 deletions

View File

@ -17,6 +17,5 @@ module Limits
MAX_INSTRUMENTS_PER_MUSICIAN = 5
# users
USERS_CAN_INVITE = false # in BETA release, only first level users can invite others
USERS_CAN_INVITE = true
end

View File

@ -775,7 +775,7 @@ module JamRuby
else
# if you are invited by an admin, we'll say you can invite too.
# but if not, then you can not invite
user.can_invite = invited_user.invited_by_administrator?
user.can_invite = Limits::USERS_CAN_INVITE #invited_user.invited_by_administrator?
# if you came in from an invite and used the same email to signup,
# then we know you are a real human and that your email is valid.

View File

@ -72,7 +72,7 @@ describe MusicSession do
user2 = FactoryGirl.create(:user) # in the jam session
user3 = FactoryGirl.create(:user) # not in the jam session
music_session = FactoryGirl.create(:music_session, :creator => user1, :musician_access => false)
music_session = FactoryGirl.create(:music_session, :creator => user1, :musician_access => false, :fan_access => false)
FactoryGirl.create(:connection, :user => user1, :music_session => music_session)
music_session.can_see?(user1).should == true

View File

@ -105,10 +105,11 @@
app.notifyAlert('Invalid emails', 'Please confirm email addresses');
} else {
rest.createEmailInvitations(emails, $('#txt-message').val())
.error(function() {
app.ajaxError();
.fail(function(jqXHR) {
app.notifyServerError(jqXHR, 'Unable to Invite Users');
app.layout.closeDialog('inviteUsers');
}).success(function() {
})
.done(function() {
app.notifyAlert('Invites sent', 'You sent '+emails.length.toString()+' email invites');
app.layout.closeDialog('inviteUsers');
});