i.e. the page you're on. this prevents constantly querying site admin
feature flags directly when getting user feature flags, while still
preserving what looks like cache coherency when you flip an account
level feature flag
Change-Id: I694c83da3d548ae34428d3ffd8e18e2384df6656
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249645
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
fixes FOO-599
test plan:
- Enable a feature flag in siteadmin
- It should not appear in regular accounts
- Enable a course and account flag in a regular account
- On refresh they should still appear
- The course flag should not appear in courses in the account
Change-Id: I6af96794b0f0f9a5534374dd32b3b539a4b7f486
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244506
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Jonathan Fenton <jfenton@instructure.com>
test plan:
* in a production-like environment, feature flag changes should
not appear to be undone when refreshing the page (while the
cache is still in the process of invalidating)
closes #ADMIN-2939
Change-Id: I495820850f8facaa6965188140d979bd5227994d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/211436
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
because clay can't spell
also get rid of that feature flag enabling on
every user in specs
also handle development features disabled in prod
Change-Id: Ifd6c590011e6963e7acea90f8f58bd2372123d26
Reviewed-on: https://gerrit.instructure.com/171781
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Looks like it broke for development feature flags when canvas was
running in production mode.
This reverts commit 974a6e809a.
Change-Id: I1946137a2c4fade435ca00fde75f2dcb3a795ac4
Reviewed-on: https://gerrit.instructure.com/171728
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Tested-by: Jenkins
QA-Review: Keith Garner <kgarner@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
because clay can't spell
also get rid of that feature flag enabling on
every user in specs
Change-Id: I96b72b94f7421a4d7b1c0215d36733f369862b2f
Reviewed-on: https://gerrit.instructure.com/171457
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Change-Id: Ie6c9e4a2682d76f9d82131f38a0ff979e192f2fa
Reviewed-on: https://gerrit.instructure.com/162291
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes QUIZ-203, closes QUIZ-3434
test plan:
case 1: when a root account is not provisioned by uuid provisioiner
- 'Quiz Next' feature flag is not visible in root account, sub
accounts and courses
case 2: when a root account is provisioned by uuid provisioiner
- should see 'Quiz Next' feature flag in root account
- when the FF in root account is turned to On, all courses have access
to Quizzes.Next (Quiz Migration and Easy button)
- when the FF is off, all courses don't have access to Quizzes.Next
- when the FF is allowed, subaccounts and courses should have options
to turn Quizzes.Next On or Off
Change-Id: Ib41ce2db9943151f47ad42a676d29b744c381799
Reviewed-on: https://gerrit.instructure.com/135805
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
test plan:
- change a course/user feature flag
- the change should stick and apply
Change-Id: I2b4045bf6a0c5c57c58591c98ddcd513e8243fa0
Reviewed-on: https://gerrit.instructure.com/126202
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
slightly less performant but it'll fix whatever's associated with
the user that's causing marshalling errors sometimes
closes #CNVS-35073
Change-Id: Id4c18b6de829687c3a7d734fa16629fc3457bd5b
Reviewed-on: https://gerrit.instructure.com/102688
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
This is one piece of SIS-2636
Refs: SIS-2636
Test Plan:
Verify that an assignment requires a due date under certain
conditions:
assignment.post_to_sis = true
account's sis_require_assignment_due_date is true
the new_sis_integrations feature flag is on
Change-Id: Id614b6606127cad630b7c622c94893289aad59e6
Reviewed-on: https://gerrit.instructure.com/99181
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Product-Review: Oxana
basically means we don't have to reload the contexts
all the time
also make sure that inverse associations are populated
when calling temp_record
Change-Id: I2a0baefeccc814746a241f506a8f2db02aa8eebf
Reviewed-on: https://gerrit.instructure.com/99642
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
basically means we don't have to reload the contexts
all the time
also make sure that inverse associations are populated
when calling temp_record
Change-Id: I22adf77d218f8084f76632d397161c05945cbae4
Reviewed-on: https://gerrit.instructure.com/98381
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
gets called multiple times per request
Change-Id: Id630760d1b34724d3d089e7dd48ad1c8268078b8
Reviewed-on: https://gerrit.instructure.com/82632
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
As a site admin user,
1. Set "Post grades to SIS" to Allowed in a root account
2. Turn it on in a course
3. Turn it back off in the root account
4. Return to the course and reload the feature settings page
5. The page should load without error
NOTE: the fact that "Post grades to SIS" is still enabled in
the course is the subject of CNVS-29319 and will be addressed
separately. tl;dr hidden features are weird
fixes CNVS-29365
Change-Id: Ia9958bb6d4a56dc45a717503e437816a82e89b0c
Reviewed-on: https://gerrit.instructure.com/79631
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
remove the copying of grading periods. teachers
and sub-account admins can no longer create
grading periods (although they can still edit
and delete previously-created grading periods),
and they cannot edit root account grading periods.
closes CNVS-26727
test plan:
1. Course level
- sign in as a teacher in a course with multiple
grading periods enabled
- navigate to the grading periods page at
/courses/:course_id/grading_standards
- if there are existing course-level grading
periods, verify you can edit and delete them
- verify you cannot create new grading periods
- if there are not existing course-level grading
periods, verify account level grading
periods show up and they are not editable (if
the sub-account owning the course has grading
periods, sub-account periods should be displayed.
if the sub-account does not exist or does not have
grading periods, the root-account grading periods
should be displayed)
2. Root account level
- sign in as a root account admin and go to the
account grading periods page at
/accounts/:account_id/grading_standards
- verify you can still add new grading periods
and you can edit existing grading periods
3. Sub-account level
- sign in as a sub-account admin and go to the
sub-account grading periods page at
/accounts/:sub_account_id/grading_standards
- if there are existing sub-account grading
periods, verify you can edit and delete them
- verify you cannot create new grading periods
- if there are not existing sub-account grading
periods, verify root account grading
periods show up and they are not editable
Change-Id: If2083defa524a81cbc557e39350b553c417e6f81
Reviewed-on: https://gerrit.instructure.com/77396
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
instead of assuming [self, Account.site_admin]
refs CNVS-26291, CNVS-26292
Change-Id: I8c20a3e29f5af91d04e380794f21705706fd96a8
Reviewed-on: https://gerrit.instructure.com/69841
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
that was only needed in rails 2
Change-Id: I1e2a00f65237d45ac82daa19eaecf5c589171718
Reviewed-on: https://gerrit.instructure.com/61025
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
explicitly have one copy per node in a ring (instead of relying
on hashing of a different to hopefully evenly spread copies around
the ring).
test plan:
* configure a ring of redis servers for cache
* canvas should still work
Change-Id: I17e086aac28c1c095c9717a7625ca51c86d0598f
Reviewed-on: https://gerrit.instructure.com/48069
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
something i came across while reading some logs
refs #CNVS-14539
Change-Id: Iaec7a290f49c2fa5a4e52550c14918abbdbfec44
Reviewed-on: https://gerrit.instructure.com/53106
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
0. enable "better file browsing" and "usage rights required"
in a course
1. upload and expand a zip file and confirm the files are
unpublished initially
2. confirm that a file imported from an imscc package is
(a) unpublished in the new course if no usage rights
were set in the source course, regardless of whether
the file was published in the source course
(b) unpublished in the new course if it was unpublished
in the source course, regardless of whether usage
rights were set in the source course
(c) published in the new course if it was published in
the source course and had usage rights set.
3. repeat step 2, but with course copy instead
fixes CNVS-19620
Change-Id: I9a32adeafb94e4922ba95ad6466c72aca3fd3598
Reviewed-on: https://gerrit.instructure.com/52465
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* confirm that the permission to "View the answer matrix
in Quiz Submission Logs" is only visible when the
"Quiz Log Auditing" feature flag is allowed on the
account level
closes #CNVS-18192
Change-Id: Ibbd0a082af20e49ef5fd5471c22ce6c236fbfade
Reviewed-on: https://gerrit.instructure.com/47820
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
fixes CNVS-14095
fixes CNVS-15157
test plan:
- with DA on and off
- go to modules page
- only the right assignments show
- completion requirements ignore
assignments that cant be seen by a user
- modules page works with changing sections
- complete/incomplete updates properly
- as does locked/unlocked
- modules page shows correct content when
a students grade is deleted and this makes
them lose assignment visibility
- modules api doesnt return any content that
a student cannot see
Change-Id: Ia1acfd919214823cdfc3b45e974876b4529bb14d
Reviewed-on: https://gerrit.instructure.com/38970
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
test plan:
- a site admin user should be able to see the hidden
lor_for_user feature in User settings
- a non-site admin user should not be able to see it,
unless a site admin user has already set it for the user
fixes CNVS-14779
Change-Id: If9a42546b209607b8728ecdb682ad0aeefe99136
Reviewed-on: https://gerrit.instructure.com/39292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
* properly cache nil per context
* cache the full lookup in-proc only
test plan:
* quick regression test of feature flags
Change-Id: I0d2435777bcc82d01301af96df81f179366b2fdc
Reviewed-on: https://gerrit.instructure.com/28118
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
prevents Marshall.dump errors that may occur
when trying to cache the Accounts with their
associations intact
fixes #CNVS-10055
Change-Id: I71195869feaf58ac2f8beeb5fc830d23d5f98bbd
Reviewed-on: https://gerrit.instructure.com/27710
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
test plan:
- install the test_features plugin (since no real features exist yet)
- render and consult the feature flags documentation
- have a test environment with a root account,
sub-account, course in sub-account, and user
- Use the "list features" endpoint as a root account admin
(with no site admin privileges), on the root account context, and
confirm that hidden features do not show up
- Use the "list features" endpoint as a site admin user,
on the root account context, and confirm that hidden features
show up
- Use the "list features" endpoint on the site admin account
and confirm the hidden features show up
- Use the "set feature flag" endpoint on a hidden feature on site
admin and ensure the feature becomes visible in all root accounts
- Use the "set feature flag endpoint" on a hidden feature on a
single root account, and ensure the feature becomes visible to
that root account and not others
- Confirm that root_opt_in features appear "Off" by default
in root accounts, after being "Allowed" in code or site admin
- Confirm a feature flag that is set to "on" or "off" (vs. "allowed")
cannot be overridden in a lower context (and the API returns
locked=true for them)
- Confirm that setting locking_account_id requires admin rights
in the locking account
- Confirm that a feature flag with locking_account_id cannot be
changed without admin rights in the locking account (e.g.,
set a feature flag on a course, locked with the root account's id,
and make sure a teacher who is not an account admin can't change it)
- Confirm feature flags can be deleted with the "remove feature flag"
endpoint (and they are only deleted where they are defined, not
when called on an object that inherits a flag)
Change-Id: I3e12e23b4454889b6e8b263f1315e82d8f2ada52
Reviewed-on: https://gerrit.instructure.com/25502
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>