closes#4332
* Allow :become_user to be granted to any root account admin role,
not just site admin roles.
* Adjust policy on User objects to properly grant :become_user:
* You can always become yourself (stop masquerading)
* Site admins can become any user besides other site admins
* Root account admins can only become users that are not account
admins, and that belong to accounts that this root account admin
has permissions to
* Adjust masquerading code to check for :become_user on the user
object itself, rather than checking just on the site admin account
* This means we have to figure out the target user before checking
permissions
* Because the permission check already checks for becoming another
site admin user, that special case was removed in the
masquerading code
* Special case the UI to not show the "become" link for the
current user (i.e. you can't become yourself, and you can't
become the user that you already are)
Change-Id: I69bc855b8ee24098b9a63b0b1c8d7edf2063b625
Reviewed-on: https://gerrit.instructure.com/4614
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
this is for better sorting in gradebook2
Change-Id: I772969a746397a5c95d8de1eaa6dab598cdcd484
Reviewed-on: https://gerrit.instructure.com/4649
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Before, in the api, we only returned sis_user_id
and sis_login_id if they were an account admin.
This relaxes the restriction to also include anyone
that can manage_students in the course. It also
returns a login_id, which is the unique_id column
from the database.
Change-Id: Ice36c5414b48a706c10d337533778a78da3b3f5e
Reviewed-on: https://gerrit.instructure.com/4648
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
also adds enrollments in batches, instead of one at a time via ajax.
closes#4835
Change-Id: Ic2aac24db2c4d5fb4482901daf8627419c548e37
Reviewed-on: https://gerrit.instructure.com/4584
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
the html files were being parse in xml mode, they should
have been in html mode
Change-Id: I0227684e95412b35d2a16d8ff2b1e7990a4617d4
Reviewed-on: https://gerrit.instructure.com/4593
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
users have both a SIS user_id and login_id, return both in the API and
allow both as ids when specifying a user in API calls using the syntax
sis_user_id:someid and sis_login_id:someid
These columns in the db aren't well named, unfortunately, but we'll try
to at least be consistent in the API.
This is technically a breaking change for the API. We've decided to go
ahead with it, as this API functionality was only recently added.
Change-Id: I8eabe4226580aa3b1aec7e5b7082b045f786e605
Reviewed-on: https://gerrit.instructure.com/4556
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
single-item failures don't stop the whole export
all errors are saved to the export object and also
written to the manifest file of the export
Change-Id: Ib92d33c2d205b1f5d09f8d60c5b87bf18abb56ed
Reviewed-on: https://gerrit.instructure.com/4588
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
added checks to extractor for some common typos/oversights (and more line numbers)
Change-Id: I7a2b080cf2a26cb6711539220fe2486a1a4f04b5
Reviewed-on: https://gerrit.instructure.com/4581
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
With some users that have thousands of files, that request can take
upwards of 10-15 seconds; even doing a head and/or limiting results
doesn't speed it up (silly googles). So instead, do a head for the
api that returns info on the token (yes, it says it's for AuthSub,
but it works for OAuth as well).
Change-Id: If838d0f6f04f313887dc734786d5cdeffa3e28a5
Reviewed-on: https://gerrit.instructure.com/4561
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
uses coffeescript, slickgrid, actual canvas APIs
reachable at /courses/x/gradebook2
does not include commenting or things external
to the grid like filtering and sorting options
Change-Id: I6967c2dbdd16f7ea4d8c1ad1995511d7c498226a
Reviewed-on: https://gerrit.instructure.com/4371
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fixed several key collisions and other minor issues
Change-Id: Ibe15c9963c26226d1d4676066b96b8a76bf50931
Reviewed-on: https://gerrit.instructure.com/4321
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
this initializer does two things:
1. it includes the core/default en translations for things like date/time
formats
2. it includes the corresponding localization file for each bundle (if
present). these will be generated offline by an as-yet-unwritten
js translation generator
Change-Id: If588cb287b027f3de62e8113dc8fa8977f41e830
Reviewed-on: https://gerrit.instructure.com/4244
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
and provide line numbers in a few places for i18n:check
Change-Id: I3de64db270bb5ae7a8ac36e6a2857f3c3adf14b6
Reviewed-on: https://gerrit.instructure.com/4279
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
You can't have a string that's both markdown_safe and html_safe, so
without this change you can't have a substitution with html in it.
Change-Id: I0f121c5dbfffd1035f937977d2bdb0851a66c320
Reviewed-on: https://gerrit.instructure.com/4251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
this lets us use wrappers and stuff with markdown
Change-Id: Ia0f778df30ca17d3b734f0ec52b295d237e6517e
Reviewed-on: https://gerrit.instructure.com/4231
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
if a user crosslists via the ui, we don't want the SIS to blow away those
changes. fixes#4840, refs #4815
Change-Id: Ia3f844b3a33d9c9a6e9433dc79ce74e433f1f389
Reviewed-on: https://gerrit.instructure.com/4162
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>