diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-05-21 08:37:45 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-05-21 08:37:45 +0300 |
| commit | 8b650b590224b4c922aab831307c7bcb29fa9fdc (patch) | |
| tree | d024fe54a40afe638a3a530014198cc79d277d51 /Software/Visual_Studio/Tango.Web/SMO | |
| parent | 3e64075a702ef7564e30e8ae12052c213dc274eb (diff) | |
| download | Tango-8b650b590224b4c922aab831307c7bcb29fa9fdc.tar.gz Tango-8b650b590224b4c922aab831307c7bcb29fa9fdc.zip | |
Fixed issue with PPC update TEMP_USER not having VIEW_DEFINITION permissions.
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/SMO')
| -rw-r--r-- | Software/Visual_Studio/Tango.Web/SMO/SmoManager.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Web/SMO/SmoManager.cs b/Software/Visual_Studio/Tango.Web/SMO/SmoManager.cs index 86953d233..b21473256 100644 --- a/Software/Visual_Studio/Tango.Web/SMO/SmoManager.cs +++ b/Software/Visual_Studio/Tango.Web/SMO/SmoManager.cs @@ -38,6 +38,12 @@ namespace Tango.Web.SMO user.Create(); user.AddToRole("db_datareader"); + // Have to add this permission so user can view column definitions (default values etc..) !!! + DatabasePermissionSet dbPermSet = new DatabasePermissionSet(); + dbPermSet.Add(DatabasePermission.ViewDefinition); + + database.Grant(dbPermSet, user.Name); + return new DbCredentials() { UserName = userName, Password = password }; } |
