This is a cursor that will loop through db objects and grant permissions to a user or group.
Not groundbreaking code, but I'm a big fan of keeping boilerplate code around to reuse. Saves tons of time.