SSDT not generating statements for permission - sql-server-data-tools

I have a SSDT project which setup to not drop anything.
Now I am trying to:
Add script to create new role
Add script to grant permission to the role created at step 1
Assign role to login without using SSDT
Now, the script to create new role (1) working fine, but there are nothing for the permission (2), I have tried to grant SELECT on schema/table but both not showing up in the resulting script.
I guess I am missing something but have no idea what it is, any pointer are welcome.

At the end the issue is nothing to do with the options but the user I use.
I am using a user with role db_ddladmin, db_datareader and db_datawriter which will not generate the statement but also no error or warning.
Tried to use another user with role db_owner then the statements is showing up as expected.
So the problem is about permission but not SSDT options.

Related

How can I find out the name of a particular permission?

I'm trying to give permission to a role on my Drupal site by using the Drush command.
The permission to "Article: create new content" should be given to the test-role role.
drush role-add-perm 'test-role' '#####'
I'm not able to figure out what to write in the #### field.
How do I write "Article: create new content" in the Drush command?
You can use Devel to get the machine name of the permission you want. Enable "Display machine names of permissions and modules" in Devel settings and the permission machine name will show when you hover on it in the permissions page. Each content type has a different permission so you will need to get the specific one you want.
One way to find out the name of the permission is inspecting the page markup on the permissions page. There you'll see something like <tr data-drupal-selector="edit-permissions-create-article-content" class="odd">. create-article-content translates to create article content.
drush role:perm:add test-role 'create article content'
Seems you are still on an older Drush version there it might be drush rap test-role 'create article content'. Better update your Drush.

can not change folder permission during installation

i know that people couldn't say that this is trivial, but i have search for days in internet and can not be able to do this.
i am using visual studio 2010 ultimate and have created my setup with setup and deployment of vs 2010.the problem is that i have an application folder which contains my database and which is deployed with my application. When i deploy it in administrator part of computer, all is correct, i devined that it is due to fullcontrol permission of administrator programfiles folder.But when i deploy it in another account, application don't has access to database for writting. i looked for the web site and understood that this is due to programfiles folder permission for others users.So i decide to do another research in order to give more rights to users for this folder.
I finally understood that i can achieve this with authoring tools like robocopy by using custom action or with a command line by just correctly write my custom action. After more researchs, i understood that i can do it with a command line which use robocopy and give folder permission during installation for this custom action or only with custom action.
for custom action, i tried many links, but the best link that i obtained was (How to give Read/Write permissions to a Folder during installation using .NET) without success (i change /folder="[CommonAppDataFolder][ProductName] with /folder="[CommonAppDataFolder][Manufacturer][ProductName] in customactiondata" due to the fact that product name is in my manufacturer folder").i don't understand why this code don't change folder permissions during installing and don't know how i can use robocopy or icalcs in custom action to change folder permissions during installation. my setup and others requirements have been packaged with dotnetInstaller, i dont know if i can be able to continue use it.
please, i greatly need your help to be able to do this
i have solved the problem. After many trying, i understood that i was giving permission to the wrong folder because my documents and database were contained in programfile folder. after understand this, i only change the place to set permission by :/folder="[ProgramFilesFolder][Manufacturer][ProductName]" and permission have been setted.

Where exactly does Membership.CreateUser Method add the new user to?

So I created my first ASP.NET MVC 3 internet application which comes with the built in functionality of registering/logging in.
I tried to explore where exactly is the database the application interacts with.In the corresponding controller/action method I see a call to Membership.CreateUser with these parameters.To which MSDN link says it adds these values to the data store.My question is to which table of what database it adds these values?(so that I can see the updates)
Using default setting, your data is saved in in its default database ASPNETDB.MDF. Click Show all files in the Solution explorer then click App_Data. You should see ASPNETDB.MDF. Double click it then a database will appear to you in the Server Expolorer. On the ASPNETDB.MDF click Tables and find aspnet_Users.
Hope this helps. :)
Assuming all the above is true (haven't change the default setup, connection string etc.) then look for tables called aspnet_users, aspnet_membership and a few others prefixed with aspnet_ . that's where to look.
If you didn't change anything, go to web.config and find DefaultConnectionString. Thats where the data inserted and the table name is UserProfiles.
it creates a db file in App_Data folder.
If you use default settings then the Database Name where the Table will be installed is: aspnetdb. Also the table names are self explanatory as seen in below image. e.g. for MemberShip the table used is: dbo.aspnet_Membership.
The tool used to install these tables is aspnet_regsql.exe, and you can easily call it from
within a Visual Studio Command Prompt window

Plone 4 Deletion Permission (security tab under ZMI)

I have the Intranet / Extranet workflow enabled on a Plone 4.2 site, I have removed most of the members permissions (so they can only view).
I created an account and started to add some content but even though I have the "Owner" role permission "Delete portal content" enabled (under mysite.com/manage_access) however my test user is unable to delete anything, which is great... However they cannot delete anything they have created either (I need them to be able to delete content they create).
I have searched on Google but am getting results related more to accomplishing bulk user actions using python scripts.
Basically what I want is that if you created the content, you are able to delete it, if you did not create it you cannot delete it.
Currently I have the second part setup and that's working, but for some reason it seems to be ignoring the "Owner" role, even on content I have created.
I can't find any other permission that I could tick that would indicate ability to delete content you own, can anyone lend any insights? Thanks.
EDIT:
To expand on the problem, it seems if I create a folder and then create content under it, that content is not deleteable, but if I then create a folder, and content within the folder I created, although the folder is not deletable the content within it is.
This was resolved by installing collective.deletepermission and adding the necessary "Delete Objects" permission to the "Owner" role in the ZMI under manage_access

Invalid object name 'umbracoDomains'

I uploaded all the files of Umbraco CMS to the my http://blog.domain.com and also modified the web.config file. When I point to blog.domain.com, it is giving an error written in the subject. The hosting type for the subdomain is physical hosting not subdomain on subfolder
So, I have a second web.config file in this subdomain. The first one is in the main domain. I hoep this doesnt make a differnce.
Here's the screenshot: http://i.stack.imgur.com/PxSqq.jpg
I checked the database user with which I am trying to login in to the DB and it has the db_owner permissions for the database.
Also, I tried googling for the similar issues to see if someone with similar error had resolved the problem. Here are some pages but I haven't been able to find a solution.
Please help! This has been pending for long! :-(
When the Umbraco database is created, a new schema is created and all tables are created under this schema (eg. . rather than dbo.).
As the Umbraco website / db are copied, I assume that you changed the credentials, meaning the Umbraco data access layer may be trying to find tables ..
I have found that changing the schema to dbo resolves this problem and can be achieved (as long as only the Umbraco tables for you website are contained in the database) with the following SQL script:
exec sp_MSforeachtable 'ALTER SCHEMA dbo TRANSFER ?'
For more details, I have recently written an article on copying an Umbraco Website found at the following URL:
http://www.carbonsoft.co.uk/articles/2012/06/copying-an-umbraco-instance.aspx
Although this question was asked some time ago, I hope this helps others with similar problems,
You also get this error if you have no database in your connection string.
Umbraco's datalayer is (unfortunately) case-sensitive - which means that Umbraco can't find the table umbracoDomains. Check that the table is correctly named and/or cased - if your database is case-insensitive then make sure that all your tables are lowercased, as this should work.
carbonrb is right, when umbraco installation creates db it uses default credentials for db user. You can change schema to dbo like carbonrb advice or create user who has default schema the same as installed by umbraco. User cannot be in sysadmin role because it will override default schema back to dbo.

Resources